|
|
back to boardY am i getting WA?? Plz Help..here's my code #include<stdio.h> #include<stdlib.h> int main(){ int n,k,hrs=0,comp=1; int rest; scanf("%d %d",&n,&k); while(comp<=k){ comp*=2; hrs++; } rest=n-comp; hrs+=(rest+k-1)/k; printf("%d",hrs); printf("\n"); } |
|
|