首页 > 学院 > 开发设计 > 正文

NYOJ 599 奋斗的蜗牛

2019-11-11 02:08:59
字体:
来源:转载
供稿:网友
#include<iostream>using namespace std;int main(){	int t;	cin>>t;	while(t--)	{	    int h,n,a=0,count=1;	   	cin>>h;	   	while(a<=h)	    {		  a=a+10;		  if(a>=h)		    break;		  else		  {		    a=a-5;			count++; 	      } 		} 		cout<<count<<endl;		}	return 0;}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表