|
|
вернуться в форумThere's a problem with test case 7..This is my program #include<stdio.h> int main() {float n,k,count=0; float m; int i=1; scanf("%f %f\n",&n,&k); n=n-1; while(n>0) {n=n-i; count++; i=i*2; if(i>=k) {m=n/k; i=m; if((m-i)>0) count=count+i+1; else count=count+i; n=0; } } i=count; printf("%d",i); return 0; } |
|
|