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

这个代码还可以,3行,能AC。

Posted by Tensu at 2009-04-02 01:41:20 on Problem 1316
#include <iostream>
#include <map>
using namespace std;
int main ()
{
    map < int, bool > NotSelf;
    for ( int i = 1; i < 10000; i++ )NotSelf[ i / 1000 + ( i / 100 ) % 10 + ( i / 10 ) % 10 + i % 10 + i ] = 1;
    for ( int i = 1; i < 10000; i++ )if ( !NotSelf[i] )printf( "%d\n", i );
}


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