首页 > 【模板】高精度加法
头像 realrole
发表于 2025-12-09 18:11:37
#include <iostream> #include<algorithm> #include<string> using namespace std; int main() { string a,b; cin>>a>> 展开全文
头像 Xuan2333
发表于 2025-12-16 21:05:34
原理说白了就是模拟小学的竖式加法,注意好进位,把输入的数当成字符串就行啦直接上代码吧,注释讲的很清楚,觉得不错的别忘了点个赞哦 #include <bits/stdc++.h> using namespace std; int main() { string A, B; 展开全文
头像 小男娘
发表于 2025-11-27 22:59:52
直接在字符串上操作即可。倒序方便进位。 #include <algorithm> #include <iostream> using namespace std; string a; string b; int main() { ios::sync_with_st 展开全文
头像 Herman欧y
发表于 2026-01-07 18:00:32
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { string s1, s2; cin >> s1 >> s2; ll le 展开全文

等你来战

查看全部