結果

問題 No.1509 Swap!!
ユーザー とりゐとりゐ
提出日時 2022-05-18 00:54:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 78,144 KB
最終ジャッジ日時 2023-10-14 04:28:44
合計ジャッジ時間 6,843 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,284 KB
testcase_01 AC 71 ms
71,268 KB
testcase_02 AC 161 ms
77,780 KB
testcase_03 AC 155 ms
78,008 KB
testcase_04 AC 153 ms
77,956 KB
testcase_05 AC 155 ms
78,144 KB
testcase_06 AC 154 ms
77,476 KB
testcase_07 AC 152 ms
77,856 KB
testcase_08 AC 153 ms
77,812 KB
testcase_09 AC 154 ms
77,836 KB
testcase_10 AC 156 ms
77,912 KB
testcase_11 AC 125 ms
77,424 KB
testcase_12 AC 126 ms
77,340 KB
testcase_13 AC 124 ms
77,180 KB
testcase_14 AC 124 ms
77,464 KB
testcase_15 AC 125 ms
77,316 KB
testcase_16 AC 123 ms
77,252 KB
testcase_17 AC 119 ms
77,416 KB
testcase_18 AC 119 ms
77,280 KB
testcase_19 AC 119 ms
77,160 KB
testcase_20 AC 120 ms
77,304 KB
testcase_21 AC 144 ms
77,336 KB
testcase_22 AC 148 ms
77,480 KB
testcase_23 AC 149 ms
77,404 KB
testcase_24 AC 146 ms
76,972 KB
testcase_25 AC 142 ms
77,396 KB
testcase_26 AC 143 ms
76,976 KB
testcase_27 AC 125 ms
77,140 KB
testcase_28 AC 128 ms
77,328 KB
testcase_29 AC 129 ms
76,948 KB
testcase_30 AC 124 ms
77,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
input=lambda :stdin.readline()[:-1]

import math
for _ in range(int(input())):
  n,a,b=map(int,input().split())
  if math.gcd(a,b)==1 and a+b<=n+1:print('YES')
  else:print('NO')
0