NYOJ 599 奋斗的小蜗牛

地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=599

 1 #include <stdio.h>
 2 int main()
 3 {
 4   int n,H;
 5   scanf("%d",&n);
 6   while(n--)
 7   {
 8     scanf("%d",&H);
 9     if(H<=10)
10       printf("1\n");
11     else if(H%5==0)
12       printf("%d\n",(H-10)/5+1);
13       else
14       printf("%d\n",(H-10)/5+2);
15   }
16   return 0;
17 }

posted on 2012-11-24 22:12  mycapple  阅读(435)  评论(0编辑  收藏  举报

导航