uva 568

 1  #include<stdio.h>
 2 
 3 int main()
 4  {
 5      int  t , i , v;
 6     while(1)
 7     {
 8         if(scanf("%d",&t)!=1)break;
 9         for(i = 1 , v = 1 ; i <= t ; i++)
10         {
11             v = v*i ;
12             while(v%10==0)
13                 v = v / 10 ;
14             v = v % 100000  ;(??)
15         }
16         printf("%5d -> %d\n",t , v%10);
17     }
18      return 0 ;
19  }

 http://blog.csdn.net/lyhvoyage/article/details/9307009

posted @ 2013-12-06 22:18  shaughn  阅读(127)  评论(0编辑  收藏  举报