竞赛
考级
代码如下: #include <bits/stdc++.h> using namespace std; int f(int a,int b,int x){ if(x==a+b) return x; else return f(a,b,x+1); } int main(){ int a,b; cin>>a>>b; printf("%d",f(a,b,1)); return 0; }
WRC-CN
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b; } //irjfijdoijgnfjngfufhesjfijfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
神
隐姓埋名
题目分析 题目要求我们输入两个数字后输出两数之和。 观察数据范围:(0<=a,b<=1090<=a,b<=10^90<=a,b<=109) 而INT_MAX的值为2147483647 也就是说这并不会爆int。 因此代码如下:
dfs却一场空
#include<iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b; cout << a+b; return 0; } 刚学完指针过来,没想到我还能写一个题ヾ(。 ̄□ ̄)ツ゜゜゜
zsy
#include<iostream> using namespace std; int main(){ long long a,b; cin>>a>>b; cout<<a+b; return 0; }
juhan214
#include <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b; return 0; }
小落
不是题解!!!
Ù̜ṔD̂Ă̭T̃̆Ē̅
#include <iostream> using namespace std; string s1,s2; int a[10005],b[10005]; int c[10005]; int main(){ cin >> s1 >> s2; int lenA=s1.size(); int lenB=s2.size(); for(int i=0; i<lenA; i++){ a[i]= s1[lenA - 1 -i] - '0'; } for(int i=0; i<lenB; i++){ b[i] = s2[lenB - 1 - i] - '0'; } /* for(int i=0; i<lenA; i++){//反转了 cout << a[i]; } */ } /* 1.用字符串存储输入的两个数字 2.将字符串逆序储存到一维数组中 2.1 逆序 2.2 将字符变为数字 3.模拟加法操作 3.1循环次数为较长数字的长度 3.2按位做加法 3.3进位 if(c[i] >= 10){ c[i] %=10; c[i+1] += 1; } 4.最高位进位的判断 if(c[len] > 0) len++; 5.反过来输出 */
激光片鱼
链接描述
宇宙炒鸡吴迪炸裂AC狗
这是最简单了了吧。。。。 做不出来的真该反思了。。。。 没什么好说的,直接看题解
李驰飞松
#include <iostream> using namespace std; int main(){ long long a,b; cin>>a>>b; cout<<a+b; }
小八
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b; return 0; }
陈114514
HrO
094com普尼
十分简单,挑战用最短代码: 高精度害死肝 就那么简单
风衾
> 任何一个伟大的思想,都有一个微不足道的开始。 本题各种语言的程序范例: C ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ C++ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Pascal ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Python2 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Python3 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Java ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ JavaScript (Node.js) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Ruby ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHP ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Rust ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ C# Mono ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Visual Basic Mono ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Kotlin ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Haskell ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Lua ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ OCaml ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Julia ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Scala ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Perl
c++player
话不说多说上代码 我也不知道我为什么要用万能头
FC Bayern
求放过
#include<iostream> using namespace std; int main(){ long long a,b; cin>>a>>b; long long final; final=a+b; cout<<final; }
王晗睿
共628条