#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 關注
- 105 瀏覽
添加回答
舉報
0/150
提交
取消