結果

問題 No.1801 Segment Game
ユーザー ntudantuda
提出日時 2022-03-16 23:31:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 381 ms / 2,000 ms
コード長 470 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 81,676 KB
実行使用メモリ 77,584 KB
最終ジャッジ日時 2023-10-25 07:08:32
合計ジャッジ時間 5,118 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,348 KB
testcase_01 AC 376 ms
77,292 KB
testcase_02 AC 381 ms
77,488 KB
testcase_03 AC 376 ms
77,528 KB
testcase_04 AC 380 ms
77,444 KB
testcase_05 AC 379 ms
77,584 KB
testcase_06 AC 374 ms
77,316 KB
testcase_07 AC 330 ms
76,612 KB
testcase_08 AC 334 ms
76,876 KB
testcase_09 AC 380 ms
77,140 KB
testcase_10 AC 38 ms
53,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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