Maximum-Cup 2013

Submission #3715903

Source codeソースコード

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;   
int n;
bool dky(int x) 
{
    for(int i=2;i<=sqrt(x);i++)
        if(x%i==0) return 0;
    return 1;
}
int main()
{
    while(1)
    {
        scanf("%d",&n);
        if(!n) break;
        for(int i=1;i<=n;i++)
        {
        	if(n%i==0)
        	{
        		if(dky(n/i))
                {
                    cout<<n/i;
                    break;
                }
			}
		}
    }
    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ソースコード長 545 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

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

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

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 AC 1 ms 256 KB
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