题解 | 23年OPPO-a的翻转
23年OPPO-a的翻转
https://www.nowcoder.com/practice/dcce2d0cc8f740c29e0885df96c9d625
#include <iostream> using namespace std; int main() { int a, b; cin>>a; int c=a; while(c){//反转a b=b*10+c%10; c/=10; } cout<<a+b; }
23年OPPO-a的翻转
https://www.nowcoder.com/practice/dcce2d0cc8f740c29e0885df96c9d625
#include <iostream> using namespace std; int main() { int a, b; cin>>a; int c=a; while(c){//反转a b=b*10+c%10; c/=10; } cout<<a+b; }
相关推荐