| ||||||||||
| 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 | |||||||||
这个算法居然用了快1000MS?想不通哦。#include <stdio.h>
#include <iostream.h>
#include <math.h>
main (void)
{
long number,i;
scanf ("%d",&number);
for (i = 3;i <= number;i++)
{
if (number % i == 0)
{
break;
}
}
cout << i - 1 << endl;
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator