結果

問題 No.1509 Swap!!
ユーザー 👑 tamatotamato
提出日時 2021-05-14 22:37:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,536 KB
実行使用メモリ 76,872 KB
最終ジャッジ日時 2024-04-10 01:21:35
合計ジャッジ時間 5,226 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,268 KB
testcase_01 AC 36 ms
54,660 KB
testcase_02 AC 114 ms
76,376 KB
testcase_03 AC 114 ms
76,516 KB
testcase_04 AC 116 ms
76,500 KB
testcase_05 AC 115 ms
76,236 KB
testcase_06 AC 111 ms
76,284 KB
testcase_07 AC 113 ms
76,456 KB
testcase_08 AC 114 ms
76,500 KB
testcase_09 AC 110 ms
76,748 KB
testcase_10 AC 106 ms
76,872 KB
testcase_11 AC 88 ms
76,068 KB
testcase_12 AC 90 ms
76,752 KB
testcase_13 AC 88 ms
76,336 KB
testcase_14 AC 87 ms
76,344 KB
testcase_15 AC 89 ms
76,204 KB
testcase_16 AC 82 ms
76,260 KB
testcase_17 AC 82 ms
76,228 KB
testcase_18 AC 81 ms
76,156 KB
testcase_19 AC 82 ms
76,284 KB
testcase_20 AC 82 ms
76,752 KB
testcase_21 AC 104 ms
76,280 KB
testcase_22 AC 105 ms
76,784 KB
testcase_23 AC 104 ms
75,984 KB
testcase_24 AC 109 ms
76,244 KB
testcase_25 AC 102 ms
76,228 KB
testcase_26 AC 100 ms
76,360 KB
testcase_27 AC 92 ms
76,348 KB
testcase_28 AC 89 ms
76,332 KB
testcase_29 AC 90 ms
76,528 KB
testcase_30 AC 90 ms
76,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import gcd
    input = sys.stdin.readline

    for _ in range(int(input())):
        N, A, B = map(int, input().split())
        if gcd(A, B) != 1 or (N-A) + (N-B) < N-1:
            print("NO")
        else:
            print("YES")


if __name__ == '__main__':
    main()
0