![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OJ
琥_珀_川
true
展开
-
A+B Problem
代码:#include using namespace std;int main(){ int a,b; cin>>a>>b; cout return 0;}原创 2016-05-31 14:39:46 · 179 阅读 · 0 评论 -
A+B Problem (Case Count)
代码: #include using namespace std; int main() { int a,b,n; cin >> n; while(n) { cin >> a >> b; cout n --; } re原创 2016-05-31 15:36:24 · 219 阅读 · 0 评论 -
A+B Problem (EOF)
#include int main(){ int a,b;while(scanf("%d%d",&a,&b)!=EOF) { printf("%d\n", a+b); } return 0;}不知道下面代码为什么不行:#include using namespace std;int main(){ int a,b;原创 2016-05-31 15:28:32 · 237 阅读 · 0 评论 -
A+B Problem (0)
代码:#include using namespace std;int main(){ int a,b; while(1) { cin >> a >> b; if(a == 0 && b == 0)break; cout << a+b << endl; } return 0;}原创 2016-05-31 15:46:25 · 278 阅读 · 0 评论 -
A+B Problem (0 + EOL)
代码:#include #include using namespace std;int main(){ int a,b; int c =0; while(cin>>a>>b && (a||b)) { if(c > 0)puts(""); c++; cout<<a + b<<end原创 2016-05-31 16:44:49 · 352 阅读 · 0 评论 -
最长的单词
DESCRIPTION:求一行句子中最长的单词,如果出现并列情况,输出字典序最小的单词,例如如果above和alive同时为最长单词,则输出aboveINPUT:行1:一行空格分隔的字母,此行最少1个字符(且非空格)最多1000个字符,单词最长16个字符OUTPUT:行1:最长的单词思路:读入字符串,分析出最长单词并保存,若有多个,输出最小单词。原创 2016-05-31 17:09:18 · 670 阅读 · 0 评论 -
A+B Problem (64bit Integer + EOF)
代码:#include using namespace std;int main(){ long long a,b; while(cin>> a>>b) { cout<<a+b<<endl; } return 0;}我并不知道还有long long ,_int64等类型。晚上查查书,更原创 2016-05-31 17:56:26 · 274 阅读 · 0 评论