Enormous Input Test ( INTEST)

here is a link of my solution…

http://www.codechef.com/viewsolution/3651260

when i am running this code on ideone.com it is giving count of divisible number by k actual count + 1 …means if ans is count =4 then it is giving count =5…so i hav submitted my solution printing count-1…can anyone help to tell me how it is coming…thanks

1 Like

It happens because once you enter n and k and then press enter ,the first string which goes inside fread is ‘\n’ and hence it increments the count by 1.

3 Likes

thanks bro… :smiley:

Your Welcome !

Why can’t I run the solution in Codeblocks?

It is getting only one input from me.

But, runs fine with online ide ?

my program is showing this error.

Main.java:2: error: class enormous is public, should be declared in a file named enormous.java
public class enormous
^
1 error

do you know how to solve it?
plz help

//