結果

問題 No.1801 Segment Game
ユーザー ntudantuda
提出日時 2022-03-16 22:53:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 81,672 KB
実行使用メモリ 76,632 KB
最終ジャッジ日時 2023-10-25 06:29:20
合計ジャッジ時間 6,241 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,416 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 AC 39 ms
53,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for i in range(T):
    H,W,D = map(int,input().split())
    D2 = D * D
    ans = 1
    if H & 1 and W & 1:
        if min(H*H+1,W*W+1) <= D*D:
            ans = 0
    elif H & 1 and not(W & 1):
        if min(H*H+1,W) <= D2:
            ans = 0
    elif not(H & 1) and W & 1:
        if min(H,W*W+1) <= D2:
            ans = 0
    else:
        if min(H,W) <= D2:
            ans = 0
    print(["N","S"][ans])
0