#include <stdio.h>int main(){int n,i,a,b=0,c1,c2,c3,c4,c5,c6,c7;printf("输入一个正整数:\n");scanf("%d",&n);i=n;if(n<1) return 44;do{b++;n=n/10;}while(n>0);if(b==3){c1=i%10;c2=i/10%10;c3=i/100;if(i==c1*c1*c1+c2*c2*c2+c3*c3*c3)printf("%d 是自幂数",i);}else if(b==4){c1=i%10;c2=i/10%10;c3=i/100%10;c4=i/1000;if(i==c1*c1*c1*c1+c2*c2*c2*c2+c3*c3*c3*c3+c4*c4*c4*c4)printf("%d 是自幂数",i);}else if(b==5){c1=i%10;c2=i/10%10;c3=i/100%10;c4=i/1000%10;c5=i/10000;if(i==c1*c1*c1*c1*c1+c2*c2*c2*c2*c2+c3*c3*c3*c3*c3+c4*c4*c4*c4*c4+c5*c5*c5*c5*c5)printf("%d 是自幂数",i);}else if(b==6){c1=i%10;c2=i/10%10;c3=i/100%10;c4=i/1000%10;c5=i/10000%10;c6=i/100000;if(i==c1*c1*c1*c1*c1*c1+c2*c2*c2*c2*c2*c2+c3*c3*c3*c3*c3*c3+c4*c4*c4*c4*c4*c4+c5*c5*c5*c5*c5*c5+c6*c6*c6*c6*c6*c6)printf("%d 是自幂数",i);}else if(b>6) printf("这个数太大,用银河计算机吧\n");else printf("不是");return 0;}