Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

dra2421's blog

By dra2421, history, 7 weeks ago, In English,

why long long k =d ,cc=0 ; while(n >=k) cc += (n/k) ,k *=d; is wrong

while this is correct long long k =d ,cc=0 ; while(n) cc +=n/k , n /=k ;

 
 
 
 
  • Vote: I like it
  • -21
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

k in case 1 overflows sometimes

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

what is kk here?

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by dra2421 (previous revision, new revision, compare).