結果
| 問題 |
No.726 Tree Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-12 18:51:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 535 ms |
| コンパイル使用メモリ | 66,272 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-28 20:32:08 |
| 合計ジャッジ時間 | 1,661 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 2 |
コンパイルメッセージ
main.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
11 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
bool isp(int X)
{
if(X<2)return false;
if(X==2)return true;
if(X%2==0)return false;
for(int i=3;i*i<=X;i+=2)if(X%i==0)return false;
return true;
}
main()
{
int X,Y;cin>>X>>Y;
int L=1,R=1;
while(!isp(X+L))L++;
while(!isp(Y+R))R++;
cout<<(L+R&1?"First":"Second")<<endl;
}