Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:easy codeIn Reply To:easy code Posted by:bobchennan at 2010-04-28 14:23:33 > int work() > { > if(n==1)return 1; > int two=B(2)-B(5); > int three=0,seven=0,nine=0; > int nn=n; > while(nn) > { > int n1=nn; > while(n1) > { > int d=n1/10; > three=(three+d)&3; > seven=(seven+d)&3; > nine=(nine+d)&3; > d=n1%10; > if(d>=3)three++; > if(d>=7)seven++; > if(d>=9)nine++; > n1/=2; > } > nn/=5; > } > two%=4; > three%=4; > seven%=4; > nine%=4; > return m2[two]*m3[three]*m7[seven]*m9[nine]%10; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator