結果
問題 | No.726 Tree Game |
ユーザー |
|
提出日時 | 2018-08-24 23:27:15 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-06-23 10:11:13 |
合計ジャッジ時間 | 3,754 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 WA * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
require 'prime'LIM = 10 ** 1333def solve(x)res = 0x += 1while x.prime?.!res += 1x += 1endreturn resendy, x = gets.split.map(&:to_i)cnt = solve(y) + solve(x)puts ((cnt % 2 == 1) ? :First : :Second)