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 |
贴代码#include<stdio.h> int sum(int n,int d) { if(n/d) return n%d+sum(n/d,d); else return n; } int main() { for(int i=2992;i<=9999;i++) if(sum(i,10)==sum(i,12)&&sum(i,10)==sum(i,16)) printf("%d\n",i); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator