You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
395 B
36 lines
395 B
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
|
|
int fun(int n) {
|
|
int b=n/100;
|
|
int s=n/10%10;
|
|
int g=n%10;
|
|
int sum=b*b*b+s*s*s+g*g*g;
|
|
if(sum==n)
|
|
return 1;
|
|
else
|
|
return 0;
|
|
}
|
|
int main() {
|
|
|
|
int n=1210;
|
|
do
|
|
{
|
|
cout<<n%10<<endl;;
|
|
n/=10;
|
|
}
|
|
while(n!=0);
|
|
|
|
|
|
|
|
// int start=100,stop=380;
|
|
// for(int i=start; i<=stop; i++) {
|
|
// if(fun(i)==1) {
|
|
// printf("%d ",i);
|
|
// }
|
|
// }
|
|
return 0;
|
|
}
|
|
|
|
|