結果

問題 No.1224 I hate Sqrt Inequality
ユーザー simansiman
提出日時 2020-09-13 10:20:24
言語 Ruby
(3.2.2)
結果
AC  
実行時間 1,176 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 11,512 KB
実行使用メモリ 15,608 KB
最終ジャッジ日時 2023-09-02 14:49:31
合計ジャッジ時間 4,520 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,368 KB
testcase_01 AC 94 ms
15,188 KB
testcase_02 AC 91 ms
15,228 KB
testcase_03 AC 92 ms
15,180 KB
testcase_04 AC 93 ms
15,428 KB
testcase_05 AC 93 ms
15,136 KB
testcase_06 AC 109 ms
15,608 KB
testcase_07 AC 93 ms
15,096 KB
testcase_08 AC 92 ms
15,104 KB
testcase_09 AC 90 ms
15,420 KB
testcase_10 AC 541 ms
15,408 KB
testcase_11 AC 1,176 ms
15,524 KB
testcase_12 AC 91 ms
15,288 KB
testcase_13 AC 91 ms
15,140 KB
testcase_14 AC 91 ms
15,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
A, B = gets.split.map(&:to_i)

gcd = A.gcd(B)
b = B / gcd

if (b.prime_division.map(&:first) - [2, 5]).empty?
  puts 'No'
else
  puts 'Yes'
end
0