I think the judge is right, because k must >1.

Moderator: Board moderators
Since September 28th 2002 the default CPU limit is 10 seconds.
It's non-negative. right?Each line will consist of two "non-negative" integers n,m which are both less than 2000000000. You must read until you reach the end of file.
Code: Select all
0 0
0 1
1 0
1 88
88 1
Code: Select all
Boring!
Boring!
Boring!
Boring!
88
Code: Select all
0 0
0 1
1 0
1 88
88 1
Code: Select all
Boring!
Boring!
Boring!
Boring!
88
Code: Select all
code has been remove because after some modification it got accepted.
Humm,yahoo wrote: [c]
while(1)
{
r=scanf("%lld%lld",&n,&m);
if(r==EOF) break;
[/c]
You should print the results only if (n%m)!=0 until the end.you must do k-1 succesive divisions to reach n = 1
Code: Select all
999 111
55 11
40 20
8 4
Code: Select all
999 9
55 5
40 2
8 2