結果
問題 |
No.281 門松と魔法(1)
|
ユーザー |
|
提出日時 | 2015-09-18 22:48:25 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 357 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-06 18:49:16 |
合計ジャッジ時間 | 3,320 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 39 RE * 2 |
ソースコード
d = int(input()) hl = [int(input()) for i in range(3)] # 3 3 4 or 3 3 2 if hl[1] == hl[0] or hl[1] == hl[2]: # 0 0 2 NG print(1 if hl[1] > 0 else -1) exit(0) # 5 7 5 or 2 0 1 if max(hl) == hl[1] or min(hl) == hl[1]: print(0) exit(0) midx = hl.index(max(hl)) print((hl[midx] - hl[1]) // d + (0 if (hl[midx] - hl[1]) % d != 0 else 1))