mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
22 lines
473 B
C++
22 lines
473 B
C++
|
#include<iostream>
|
||
|
#include<cmath>
|
||
|
using namespace std;
|
||
|
int main()
|
||
|
{
|
||
|
for(int a=3;a!=201;++a)
|
||
|
{
|
||
|
for(int i=2;i<=200;++i)
|
||
|
{
|
||
|
for(int j=i;j<=200;++j)
|
||
|
{
|
||
|
for(int k=j;k<=200;++k)
|
||
|
{
|
||
|
if(i*i*i+j*j*j+k*k*k==a*a*a)
|
||
|
cout<<"Cube = "<<a<<", Triple = ("<<i<<","<<j<<","<<k<<")\n";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|