結果

問題 No.1224 I hate Sqrt Inequality
ユーザー gemmarogemmaro
提出日時 2020-09-18 08:33:40
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,183 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 11,500 KB
実行使用メモリ 15,416 KB
最終ジャッジ日時 2023-09-08 00:05:56
合計ジャッジ時間 4,936 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
15,196 KB
testcase_01 AC 87 ms
15,080 KB
testcase_02 AC 88 ms
15,176 KB
testcase_03 AC 87 ms
15,144 KB
testcase_04 AC 87 ms
15,348 KB
testcase_05 AC 89 ms
15,228 KB
testcase_06 AC 106 ms
15,416 KB
testcase_07 AC 89 ms
15,312 KB
testcase_08 AC 90 ms
15,184 KB
testcase_09 AC 89 ms
15,144 KB
testcase_10 AC 536 ms
15,356 KB
testcase_11 AC 1,183 ms
15,288 KB
testcase_12 AC 88 ms
15,216 KB
testcase_13 AC 87 ms
15,080 KB
testcase_14 AC 87 ms
15,212 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# frozen_string_literal: true

require 'prime'

def solve
  (Prime.prime_division(B / A.gcd(B)).map { |n, _e| n } - [2, 5]).empty? ? 'No' : 'Yes'
end

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

puts solve
0