結果

問題 No.2847 Birthday Attack
コンテスト
ユーザー dp_ijk
提出日時 2024-08-23 23:02:17
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 300 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 272 ms
コンパイル使用メモリ 96,012 KB
実行使用メモリ 83,584 KB
最終ジャッジ日時 2026-08-25 04:28:26
合計ジャッジ時間 3,205 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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)
0