結果
問題 |
No.2847 Birthday Attack
|
ユーザー |
![]() |
提出日時 | 2024-08-23 23:02:17 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 300 bytes |
コンパイル時間 | 311 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 75,524 KB |
最終ジャッジ日時 | 2024-08-23 23:02:20 |
合計ジャッジ時間 | 2,131 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | WA * 14 |
ソースコード
X, Y, M = map(int, input().split()) ans = 0 cnt = 0 for r in range(1, (X-1) // 2 + 1): term = X - r*2 assert term >= 0 cnt += term cnt *= Y*2 ans += cnt cnt = 0 for r in range(1, (Y-1) // 2 + 1): term = Y - r*2 assert term >= 0 cnt += term cnt *= X*2 ans += cnt ans %= M print(ans)