結果

問題 No.1801 Segment Game
ユーザー 👑 rin204rin204
提出日時 2022-01-21 01:17:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 458 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 78,696 KB
最終ジャッジ日時 2024-05-03 12:48:33
合計ジャッジ時間 5,882 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,968 KB
testcase_01 AC 444 ms
78,696 KB
testcase_02 AC 409 ms
77,980 KB
testcase_03 AC 430 ms
78,404 KB
testcase_04 AC 458 ms
78,180 KB
testcase_05 AC 432 ms
77,668 KB
testcase_06 AC 423 ms
78,408 KB
testcase_07 AC 358 ms
77,312 KB
testcase_08 AC 385 ms
77,312 KB
testcase_09 AC 388 ms
78,544 KB
testcase_10 AC 32 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    h, w, d = map(int, input().split())
    d *= d
    if w % 2 == 0:
        min_ = h * h
    else:
        min_ = h * h + 1
    
    if h % 2 == 0:
        min_ = min(min_, w * w)
    else:
        min_ = min(min_, w * w + 1)
    if min_ <= d:
        print("N")
    else:
        print("S")
    
for _ in range(int(input())):
    solve()
0