結果

問題 No.1113 二つの整数 / Two Integers
ユーザー yocto_sothothyocto_sothoth
提出日時 2020-07-24 23:27:02
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 174 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 11,404 KB
実行使用メモリ 19,744 KB
最終ジャッジ日時 2023-09-08 05:23:51
合計ジャッジ時間 6,555 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
15,372 KB
testcase_01 AC 96 ms
15,184 KB
testcase_02 AC 939 ms
15,420 KB
testcase_03 AC 787 ms
15,560 KB
testcase_04 AC 795 ms
15,560 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'

a, b = gets.split.map(&:to_i)
gcd = a.gcd(b)

if gcd == 1
  puts :Odd
else
  puts gcd.prime_division.map { |_p, e| e + 1 }.inject(:*).odd? ? :Odd : :Even
end
0