結果
| 問題 | No.1448 和差算 |
| コンテスト | |
| ユーザー |
y61mpnl
|
| 提出日時 | 2021-04-02 18:07:01 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 399µs | |
| コード長 | 227 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2026-10-17 10:33:06 |
| 合計ジャッジ時間 | 3,155 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
a, b, c, d = map(int, input().split()) n = int(input()) mod = int(1e9+7) x, y = -a, d if n%8<=3: x = b if 2<=n%8<=5: y = -c if n%8 in (3,7): x = 0 if n%8 in (1,5): y = 0 ans = (x + y) * pow(2, (n+1)//2, mod) % mod print(ans)
y61mpnl