Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6556 詹梓涵 数字反转 C++ Compile Error 0 MS 0 KB 742 2025-03-08 08:50:24

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,a1,a2=0,b1,b2=0,t,x=0; cin>>n; while(n--){ cin>>a1>>b1; t=a; while(t!=0){ a2=a2*10+t%10; t/=10; } t=b; while(t!=0){ b2=b2*10+t%10; t/=10; } t=a+b; while(t!=0){ x=x*10+t%10; t/=10; } if(x==a2+b2) cout<<a+b; else cout<<"NO"; cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:11: error: 'a' was not declared in this scope
         t=a;
           ^
Main.cc:16:11: error: 'b' was not declared in this scope
         t=b;
           ^