hdu ACM Steps 1.1
来源:互联网 发布:芒果tv软件下载 编辑:程序博客网 时间:2024/03/29 15:40
1.1.1 A+B for Input-Output Practice (I)
#include<iostream>using namespace std;int main(){ int a,b; while (cin>>a>>b) { cout<<a+b<<endl; }}
1.1.2 A+B for Input-Output Practice (II)
#include<iostream>using namespace std;int main(){ int a,b,tt; cin>>tt; for (int t=0;t<tt;t++) { cin>>a>>b; cout<<a+b<<endl; }}
1.1.3 A+B for Input-Output Practice (III)
#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; while (a!=0 || b!=0) { cout<<a+b<<endl; cin>>a>>b; }}
1.1.4 A+B for Input-Output Practice (IV)
#include<iostream>using namespace std;int main(){ int a,b,n; cin>>n; while (n!=0) { a=0; for (int i=0;i<n;i++) { cin>>b; a+=b; } cout<<a<<endl; cin>>n; }}
1.1.5 A+B for Input-Output Practice (V)
#include<iostream>using namespace std;int main(){ int a,b,n,t; cin>>t; for (int tt=0;tt<t;tt++) { cin>>n; a=0; for (int i=0;i<n;i++) { cin>>b; a+=b; } cout<<a<<endl; }}
1.1.6 A+B for Input-Output Practice (VI)
#include<iostream>using namespace std;int main(){ int a,b,n; while(cin>>n) { a=0; for (int i=0;i<n;i++) { cin>>b; a+=b; } cout<<a<<endl; }}
1.1.7 A+B for Input-Output Practice (VII)
#include<iostream>using namespace std;int main(){ int a,b,n; while(cin>>a>>b) { cout<<a+b<<endl<<endl; }}
1.1.8 A+B for Input-Output Practice (VIII)
#include<iostream>using namespace std;int main(){ int a,b,n,t; cin>>t; for (int tt=0;tt<t;tt++) { cin>>n; a=0; for (int i=0;i<n;i++) { cin>>b; a+=b; } cout<<a<<endl; if (tt<t-1) cout<<endl; }}
- hdu ACM Steps 1.1
- hdu ACM Steps 1.2
- hdu ACM Steps 1.3
- hdu ACM Steps 2.1
- hdu ACM Steps 2.2
- hdu ACM Steps 2.3
- hdu ACM Steps 3.1
- hdu ACM Steps 3.2
- hdu ACM Steps 3.3
- HDU ACM Steps 攻略
- hdu acm steps 1.3.1
- hdu acm steps 1.3.2
- hdu acm steps 1.3.3
- hdu acm steps 1.3.4
- hdu acm steps 1.3.5
- hdu acm steps 1.3.6
- hdu acm steps 1.3.7
- hdu acm steps 1.3.8
- 禁止删除销售订单
- mysql的grant用法
- Cron Expressions
- ZOJ3332-竞赛图中的哈密顿路
- ShellExecute函数
- hdu ACM Steps 1.1
- 2、Android Market简介&注册过程
- 我要学ASP.NET MVC 3.0(六): MVC 3.0创建你的View视图
- eclipse和maven在生成报告的时候产生栈溢出
- Hiberante事务并发处理
- windbg+vmware+win7 内核
- 产品经理和开发工程师的“功与防”
- 设计模式之七 --- 观察者模式(Observer)
- 1、Google Checkout简介&开通流程