結果

問題 No.1801 Segment Game
ユーザー 👑 rin204
提出日時 2022-01-21 01:17:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 410 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 78,916 KB
最終ジャッジ日時 2024-11-24 12:45:33
合計ジャッジ時間 5,095 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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