結果

問題 No.1801 Segment Game
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-12-18 16:47:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-26 20:46:36
合計ジャッジ時間 8,952 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 841 ms
10,624 KB
testcase_02 AC 840 ms
10,752 KB
testcase_03 AC 847 ms
10,624 KB
testcase_04 AC 844 ms
10,752 KB
testcase_05 AC 837 ms
10,624 KB
testcase_06 AC 858 ms
10,752 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 816 ms
10,752 KB
testcase_10 AC 30 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt
t = int(input())
for _ in range(t):
    h, w, d = map(int, input().split())
    if h % 2 == 0 and w % 2 == 0: d_min = min(sqrt(h ** 2), sqrt(w ** 2))
    if h % 2 == 0 and w % 2 == 1: d_min = min(sqrt(h ** 2 + 1), sqrt(w ** 2))
    if h % 2 == 1 and w % 2 == 0: d_min = min(sqrt(h ** 2), sqrt(w ** 2 + 1))
    if h % 2 == 1 and w % 2 == 1: d_min = min(sqrt(h ** 2 + 1), sqrt(w ** 2 + 1))
    print("N" if d_min <= d else "S")
0