結果

問題 No.1801 Segment Game
ユーザー gr1msl3ygr1msl3y
提出日時 2022-02-23 21:09:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 235 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 897 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 85,512 KB
最終ジャッジ日時 2023-09-14 14:13:29
合計ジャッジ時間 4,255 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,316 KB
testcase_01 AC 230 ms
85,120 KB
testcase_02 AC 235 ms
85,268 KB
testcase_03 AC 231 ms
84,932 KB
testcase_04 AC 232 ms
85,328 KB
testcase_05 AC 231 ms
85,512 KB
testcase_06 AC 230 ms
84,924 KB
testcase_07 AC 189 ms
84,792 KB
testcase_08 AC 198 ms
84,716 KB
testcase_09 AC 229 ms
84,732 KB
testcase_10 AC 69 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    T = int(input())
    ans = []
    for _ in range(T):
        h, w, d = map(int, input().split())
        ans.append(solve(h, w, d))
    print(*ans, sep='\n')


def solve(h, w, d):
    f = 0
    if h % 2:
        f |= w**2+1 <= d**2
    else:
        f |= w <= d
    if w % 2:
        f |= h**2+1 <= d**2
    else:
        f |= h <= d
    return 'N' if f else 'S'


main()
0