#include<bits/stdc++.h>#include <windows.h>using namespace std;bool check(int x){int rx=0,s;s=x;while(x!=0){rx=rx*10+(x%10);x/=10;}if(rx==s){return true;}return false;}int main() { int n,m,s=0;long long x;char ch[1001]; cin>>n>>m;for(int i=1;i<=n;i++){itoa(i*i,ch,m);x=atol(ch);if(check(x)==true){s++; }}cout<<s<<endl;return 0; }Main.cc: In function ‘int main()’:Main.cc:26:16: error: ‘itoa’ was not declared in this scopeitoa(i*i,ch,m);^辅助解释:error: ‘itoa’ was not declared in this scope:函数或变量没有声明过就进行调用,检查下是否导入了正确的头文件
- 1 回答
- 0 关注
- 80 浏览
添加回答
举报
0/150
提交
取消