标签:style blog io color os sp div on log
3 2
3
1 #include <stdio.h> 2 3 int main(){ 4 int n; 5 int k; 6 int total; 7 int result; 8 9 while(scanf("%d%d",&n,&k)!=EOF){ 10 total=n*2; 11 12 if(total<k){ //没有考虑到total<k的情况 13 printf("2\n"); 14 continue; 15 } 16 17 result=total/k; 18 19 if(total%k!=0) 20 result++; 21 22 printf("%d\n",result); 23 } 24 25 return 0; 26 }
标签:style blog io color os sp div on log
原文地址:http://www.cnblogs.com/zqxLonely/p/4100141.html