symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2014年1月14日

摘要: 一天两个题,凑数用的大水题啊。。。不解释了。。羞愧ing 1 #include 2 int main(){ 3 int t; 4 int i; 5 int a[100],b[100],tot; 6 while(~scanf("%d",&t)&&t!=-1){ 7 tot=0; 8 for(i=0;i<t;++i){ 9 scanf("%d%d",&a[i],&b[i]);10 if(i==0)11 tot+=a[i]*b[i];12 ... 阅读全文
posted @ 2014-01-14 23:10 symons 阅读(94) 评论(0) 推荐(0)

摘要: 为了凑今天的数,大水题。不解释了,说来惭愧。 1 #include 2 int main(){ 3 int n; 4 int i,cnt,j; 5 int tot; 6 while(~scanf("%d",&n)){ 7 if(n==0) break; 8 tot=0; 9 cnt=1;10 j=0;11 for(i=1;i<=n;++i){12 tot+=cnt;13 j++;14 if(j==cnt){15... 阅读全文
posted @ 2014-01-14 21:51 symons 阅读(167) 评论(0) 推荐(0)