首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
太一
2026年3月19日 23:42
数字反转 题解:
P1276
回复 0
|
赞 1
|
浏览 28
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int main() { int a, b; while (cin >> a >> b) { int arr[10000], brr[10000], index1 = 0, index2 = 0, sum1 = 0, sum2 = 0, sum = 0, index...
mlx
2026年3月13日 12:21
数字反转 题解:
P1276
回复 0
|
赞 0
|
浏览 54
#include<iostream> using namespace std; int a,b; int turn(int x) { int sum=0; while(x) { int t=x%10; sum=sum*10+t; x/=10; } return sum; } int main() { while(cin>>a>>b) { int num1=turn(a+b); ...
曾不会
2026年1月31日 18:48
数字反转 题解:
P1276
回复 0
|
赞 0
|
浏览 113
def fun(x): m=str(x) mm=m[::-1] return mm while(1): try: sm=list(map(int,input().split())) m=sm[0] n=sm[1] count1=m+n &...
zxjrheaven
2025年3月24日 19:59
数字反转 题解:暴力
P1276
回复 0
|
赞 1
|
浏览 927
#include <bits/stdc++.h> using namespace std; int main() { string m,n; while(cin>>m>>n) { int a=stoi(m); int b=stoi(n); &n...
jsd
2025年1月22日 14:03
数字反转 题解:STL大法好
P1276
回复 0
|
赞 5
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; int main() { int m, n; while(cin>>m>>n) { int ans = m + n; string s1 = to_string(m); &...
huanghu
2024年3月24日 15:38
数字反转 题解:c++
P1276
回复 0
|
赞 0
|
浏览 1.4k
#include <iostream> #include <vector> #include<string> #include<algorithm> using namespace std; int reverse(int n){ int sum = 0; int t = 1; while(n){ int remain = n%10; sum = sum*t + remain; n/=10; t*=10; } return sum; } int main(){ int...
小王桐学
2024年3月4日 16:31
数字反转 题解:C
P1276
回复 0
|
赞 3
|
浏览 1.1k
#include <stdio.h> int Reverse(int n) { int m = 0; while(n) { m = m*10+n%10; n/=10; } return m; } int main() { int a,b; while(scanf("%d %d",&a,&b) != EOF) { int sum1 = a+b,sum2; sum2 = Reverse(a) + Reverse(b); if(Reverse(sum1) == sum2) p...
活着的传奇
2023年8月29日 10:36
数字反转 题解:
P1276
回复 0
|
赞 0
|
浏览 1.9k
#include<bits/stdc++.h> using namespace std; int fanzhuanshu(int n){ int s=0;int a; while(n>0){ a=n%10; s=s*10+a; n=n/10; } return s; } // 求反转数 int main(){ int a,b,c,d;int e,f; int s=0,y=0; while(cin>>a>>b){ c=fanzhuanshu(a); d=fanzhuanshu(b...
My_opt
2022年4月26日 17:22
c++
P1276
回复 0
|
赞 0
|
浏览 4.8k
#include <iostream> using namespace std; int a, b; int rev(int x) { int y = 0; for (; x; x /= 10) y = y * 10 + x % 10; return y; } int main() { while (cin >> a >> b) if (rev(a) + rev(b) == rev(a + b)) cout << a + b << endl; else puts("...
lljpwrs
2022年3月5日 16:31
根据题意反转即可
P1276
回复 0
|
赞 0
|
浏览 5.8k
#include <iostream> #include <cstdio> using namespace std; int reverse(int x){ int res = 0; while(x != 0){ res = res * 10 + x % 10; x /= 10; } return res; } int main(){ int x1, y1, res1; int x2, y2, res2; while(scanf("%...
1
2
题目
数字反转
题解数量
13
发布题解
在线答疑
热门题解
1
数字反转 题解:STL大法好
2
数字反转 题解:C
3
数字反转 题解:暴力
4
数字反转
5
用string做他不香吗
6
数字反转 题解:
7
数字反转 题解:
8
根据题意反转即可
9
数字反转 题解:c++
10
数字反转 题解: