Maximum-Cup 2013

Submission #3629740

Source codeソースコード

#include<bits/stdc++.h>
using namespace std;
bool a[100000000];int x;
int main()
{
	while(!x)
	{ scanf("%d",&x);
	  for(int i=2;i<x;i++)
	  { if(!a[i]&&!(x%i)){printf("%d\n",i);break;} 
	    if(!a[i])for(int j=1;j*i<=x;j++)a[j*i]=1;}
	}
	return 0;
}

Submission

Task問題 B - Working for the World
User nameユーザ名 luogu_bot5
Created time投稿日時
Language言語 C++ (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 261 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
{ scanf("%d",&x);
^

Test case

Set

Set name Score得点 / Max score Cases
All 0 / 100 00-sample,10-minimum,11-maximum,12-little,13-large,14-middle,15-zero,50-random00,50-random01,50-random02,50-random03,50-random04,50-random05,50-random06,50-random07,50-random08,50-random09,50-random10,50-random11,50-random12,50-random13,50-random14,50-random15,50-random16,50-random17,50-random18,50-random19

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00-sample WA
10-minimum WA
11-maximum WA
12-little WA
13-large WA
14-middle WA
15-zero TLE
50-random00 WA
50-random01 WA
50-random02 WA
50-random03 WA
50-random04 WA
50-random05 WA
50-random06 WA
50-random07 WA
50-random08 WA
50-random09 WA
50-random10 WA
50-random11 WA
50-random12 WA
50-random13 WA
50-random14 WA
50-random15 WA
50-random16 WA
50-random17 WA
50-random18 WA
50-random19 WA