結果
問題 | No.1801 Segment Game |
ユーザー |
|
提出日時 | 2021-12-18 16:47:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 447 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-14 11:45:21 |
合計ジャッジ時間 | 9,149 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 8 WA * 2 |
ソースコード
from math import sqrtt = 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")