結果

問題 No.1509 Swap!!
ユーザー wolgnikwolgnik
提出日時 2021-05-14 22:57:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 76,928 KB
最終ジャッジ日時 2024-10-02 03:31:25
合計ジャッジ時間 6,049 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 17 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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