Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

此题告诉我们一个道理,数本身是没有进制的

Posted by hustcswgy at 2011-08-17 16:37:07 on Problem 2196
#include <stdio.h>

int root(int i, int b)
{
    int sum = 0;
    for(; i > 0; i /= b) sum += i%b;
    return sum;
}

int main()
{
    int i;
    for(i = 2992; i < 10000; i ++)
        if(root(i, 10) == root(i, 12) && root(i, 12) == root(i, 16)) printf("%d\n", i);
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator