結果

問題 No.1113 二つの整数 / Two Integers
ユーザー yocto_sothothyocto_sothoth
提出日時 2020-07-24 23:38:12
言語 Ruby
(3.4.1)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 129 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-06-25 22:52:21
合計ジャッジ時間 2,478 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

puts  sqrt == sqrt.to_i && sqrt.to_i**2 == gcd ? :Odd : :Even
0