You are not logged in. Please login at www.codechef.com to post your questions!

×

What's wrong with this code?

def div(n,k):
count=0
for i in range(n):
    integer=int(input())
    if integer%k==0:
        count+=1
print count

asked 30 Jun '13, 20:04

saikiransunny's gravatar image

2★saikiransunny
1155
accept rate: 0%

edited 30 Jun '13, 20:12

sunny_patel's gravatar image

2★sunny_patel
1.3k31025

1

i dont see any! what problem are you facing exactly? please elaborate.

(30 Jun '13, 20:08) sunny_patel2★

pls provide the problem statement or the link to the ques...if it is of the Lunch Time that took place today then pls ask in the respective editorial!!!

(30 Jun '13, 20:17) kunal3614★

i now notice that it is INTEST....u need to take the input for n and k in the following manner....

n,k=map(int,raw_input().split())

as n and k are given as input in the same line then it may give an error if u read then individually like...

n=int(input())
k=int(input())

as in this the 1st input will take input as "number number"...i.e. a space in between!!!

hope this helps!!!!

link

answered 30 Jun '13, 23:57

kunal361's gravatar image

4★kunal361
6.0k133272
accept rate: 21%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×214

question asked: 30 Jun '13, 20:04

question was seen: 559 times

last updated: 30 Jun '13, 23:57