1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <cstdio> using namespace std; int i,j,h,m,n,k,b[11]; int main(){ scanf("%d",&n); for ( i = 1; i <=10; i++){ m=n;j=11; while(m>0){ j=j-1;b[j]=m%10;m=m/10; } for (h=1; h<=10; h++)n=n+b[h]; } printf("%d",n); } |
0 of 4 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 4 Questions answered correctly
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、将09行修改为while(m){,输出结果不变( )
2、时间复杂度为O(n)。 ( )
3、当输入为”1234″时,输出为( )。
4、当输入为”1145″时,输出为( )