解题思路:
注意事项:
参考代码:
/* */ #include <cstdio> #include <algorithm> #include <iostream> using namespace std; bool check(int n){ int a=n/100; int b=n%100/10; int c=n%10; int t= a*a*a + b*b*b + c*c*c; if(t==n) return true; return false; } int main(){ int n; cin>>n; if(check(n)) cout<<"YES"; else cout<<"NO"; return 0; }
0.0分
2 人评分
C语言程序设计教程(第三版)课后习题9.2 (C语言代码)浏览:687 |
C语言程序设计教程(第三版)课后习题8.4 (Java代码)浏览:728 |
C语言程序设计教程(第三版)课后习题9.8 (Java代码)浏览:1635 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:1028 |
校门外的树 (C语言代码)浏览:956 |
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:762 |
WU-蓝桥杯算法提高VIP-交换Easy (C++代码)浏览:1107 |
C语言程序设计教程(第三版)课后习题10.4 (C语言代码)浏览:879 |
文科生的悲哀 (C语言代码)浏览:1397 |
1071题解浏览:484 |