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.

15 lines
317 B

#include<bits/stdc++.h>
using namespace std;
int main() {
int i,j,k,l,m,n;
for(i=1; i<=9; i++)
for(j=0; j<=9; j++)
for(k=0; k<=9; k++)
for(l=0; l<=9; l++)
if((i*1000+j*100+k*10+l)==i*i*i*i+j*j*j*j+k*k*k*k+l*l*l*l)
printf("%d%d%d%d=%d^4+%d^4+%d^4+%d^4\n", i, j, k, l, i, j, k, l);
return 0;
}