結果
| 問題 |
No.726 Tree Game
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2020-03-28 02:41:04 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 586 bytes |
| コンパイル時間 | 1,570 ms |
| コンパイル使用メモリ | 173,456 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-22 05:59:50 |
| 合計ジャッジ時間 | 2,403 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 2 |
ソースコード
import std;
int nextPrimeDistance(int n) {
if (n == 1 || n == 2) return 0;
if (n % 2 == 0) return 0;
return 1;
}
void calc(int y, int x) {
int d = nextPrimeDistance(y) + nextPrimeDistance(x);
if (d % 2 == 1) writeln("First");
else writeln("Second");
}
void main() {
int y, x; scan(y, x);
calc(y, x);
}
void scan(T...)(ref T a) {
string[] ss = readln.split;
foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;
norioc