Maximum-Cup 2013

Submission #3629809

Source codeソースコード

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

Submission

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

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

./Main.cpp: In function ‘int main()’:
./Main.cpp:14: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 AC 1 ms 256 KB
10-minimum WA
11-maximum AC 60 ms 256 KB
12-little WA
13-large WA
14-middle WA
15-zero AC 5 ms 256 KB
50-random00 WA
50-random01 WA
50-random02 WA
50-random03 AC 2 ms 256 KB
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 AC 2 ms 256 KB
50-random13 WA
50-random14 WA
50-random15 AC 2 ms 256 KB
50-random16 AC 1 ms 256 KB
50-random17 WA
50-random18 WA
50-random19 AC 2 ms 256 KB