会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
csushin
上一页
1
2
Section2.2
摘要: #include<stdio.h>int main(){ int a,b,c; while(scanf("%X%X",&a,&b)!=EOF) { c=a+b; printf("%d\n",c); }}
阅读全文
posted @ 2011-09-30 23:05 csushin
阅读(62)
评论(0)
推荐(0)
Section2.1
摘要: #include<stdio.h>int main(){ int N,a,b=0,s=0,i; while(scanf("%d",&N)==1) { if(N==0) break; for(i=0;i<N;i++) { scanf("%d",&a); if(a>b) s=6*(a-b)+5+s; else s=s+4*(b-a)+5; b=a; } printf("%d\n",s); a=0;s=0;N=0;b=0; }}
阅读全文
posted @ 2011-09-30 23:01 csushin
阅读(68)
评论(0)
推荐(0)
上一页
1
2
导航
博客园
首页
联系
订阅
管理
公告