- 数字反转
can can world 为什么出不来数字
- 2023-12-16 15:15:21 @
#include <bits/stdc++.h> using namespace std; int main(){ long long a,b=0,c,d=1; cin>>a; while(1) { int d=d+log10(a); } for(int i=0;i<=a;i++) { c= pow (10,d); if(a%10>=0&&a>=10)b=b+a%10*c; d=d-1; if(a<10){ b=b+a; break;} } cout<<b<<endl; return 0; }
3 comments
-
经开一中2026届11班关泽瑞 LV 6 @ 2023-12-16 19:13:01
#include <bits/stdc++.h> using namespace std; int main() { long long a, m=0; cin >> a; while(a!=0) { m=m*10+a%10; a/=10; } cout << m<<endl; return 0; }
-
2023-12-16 15:16:35@
👎
-
2023-12-16 15:16:12@
你的代码太丑了
- 1
Information
- ID
- 583
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- (None)
- # Submissions
- 179
- Accepted
- 77
- Uploaded By