题解
2024-07-14 20:51:33
发布于:上海
0阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int n;
void scan ()
{
cin >> n;
}
bool equal (int a , int b , int c)
{
return a + b + c == n;
}
bool s ()
{
int a = n / 100;
int b = (n - a * 100) / 10;
int c = n - a * 100 - b * 10;
a = pow (a , 3);
b = pow (b , 3);
c = pow (c , 3);
if (equal(a , b , c))
{
return true;
}
return false;
}
void print ()
{
if (s() == true)
{
cout << "YES";
}
else
{
cout << "NO";
}
}
int main(void){
scan();
print();
}
这里空空如也
有帮助,赞一个