結果
| 問題 |
No.72 そろばん Med
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-16 09:30:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 5,000 ms |
| コード長 | 167 bytes |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 11,904 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-10-16 09:30:31 |
| 合計ジャッジ時間 | 2,509 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
n = int(input()) mod = 1000007 x1 = n // 2 x2 = n // 2 + 1 ans = 0 ans = max(ans, -(x1 * x1) + (x1 * n) + n) ans = max(ans, -(x2 * x2) + (x2 * n) + n) print(ans % mod)