結果

問題 No.1509 Swap!!
ユーザー wolgnikwolgnik
提出日時 2021-05-14 22:57:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 82,536 KB
実行使用メモリ 77,076 KB
最終ジャッジ日時 2024-04-10 02:13:01
合計ジャッジ時間 5,320 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,016 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 97 ms
76,420 KB
testcase_12 AC 94 ms
76,336 KB
testcase_13 AC 94 ms
75,936 KB
testcase_14 AC 95 ms
75,972 KB
testcase_15 AC 95 ms
76,028 KB
testcase_16 AC 88 ms
75,952 KB
testcase_17 AC 89 ms
75,992 KB
testcase_18 AC 87 ms
75,952 KB
testcase_19 AC 88 ms
76,020 KB
testcase_20 AC 88 ms
76,200 KB
testcase_21 AC 129 ms
76,328 KB
testcase_22 AC 123 ms
76,332 KB
testcase_23 AC 124 ms
76,200 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 93 ms
76,016 KB
testcase_28 AC 95 ms
76,020 KB
testcase_29 AC 96 ms
76,124 KB
testcase_30 AC 101 ms
76,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
for _ in range(int(input())):
  N, A, B = map(int, input().split())
  if A < B: A, B = B, A
  if gcd(A, B) == 1 and (N // B >= A - 1 or N // A >= B - 1): print("YES")
  else: print("NO")
0