結果

問題 No.2847 Birthday Attack
コンテスト
ユーザー dp_ijk
提出日時 2024-08-23 23:02:17
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 300 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 154 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 80,128 KB
最終ジャッジ日時 2026-04-03 22:05:31
合計ジャッジ時間 1,428 ms
ジャッジサーバーID
(参考情報)
judge5_1 / judge1_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