結果

問題 No.726 Tree Game
ユーザー 0w10w1
提出日時 2018-08-24 21:28:43
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 11,456 KB
実行使用メモリ 15,684 KB
最終ジャッジ日時 2023-09-05 11:00:01
合計ジャッジ時間 3,988 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,684 KB
testcase_01 AC 95 ms
15,472 KB
testcase_02 AC 94 ms
15,672 KB
testcase_03 AC 94 ms
15,664 KB
testcase_04 AC 94 ms
15,444 KB
testcase_05 AC 94 ms
15,460 KB
testcase_06 AC 95 ms
15,464 KB
testcase_07 WA -
testcase_08 AC 94 ms
15,568 KB
testcase_09 WA -
testcase_10 AC 92 ms
15,528 KB
testcase_11 AC 94 ms
15,600 KB
testcase_12 AC 95 ms
15,576 KB
testcase_13 AC 94 ms
15,540 KB
testcase_14 AC 95 ms
15,460 KB
testcase_15 AC 94 ms
15,544 KB
testcase_16 AC 97 ms
15,648 KB
testcase_17 AC 102 ms
15,516 KB
testcase_18 AC 97 ms
15,608 KB
testcase_19 AC 99 ms
15,528 KB
testcase_20 AC 101 ms
15,588 KB
testcase_21 AC 99 ms
15,608 KB
testcase_22 AC 104 ms
15,632 KB
testcase_23 AC 102 ms
15,612 KB
testcase_24 AC 99 ms
15,680 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
y, x = gets.split.map(&:to_i)
a = [(y + 1...Float::INFINITY).find { |i| Prime.prime?(i) }, 10**1333].min
b = [(x + 1...Float::INFINITY).find { |i| Prime.prime?(i) }, 10**1333].min
c = a - y
d = b - x
puts [:Second, :First][c + d & 1]
0