結果

問題 No.2847 Birthday Attack
コンテスト
ユーザー shobonvip
提出日時 2024-08-23 22:55:55
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 257 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 164 ms
コンパイル使用メモリ 85,156 KB
実行使用メモリ 53,852 KB
最終ジャッジ日時 2026-04-03 22:04:35
合計ジャッジ時間 1,160 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

x, y, mod = map(int,input().split())
ax = (x//2) * (x//2 - 1) // 2 * 2 % mod
if x % 2 == 1: ax = (ax + x//2) % mod
ax = ax * y * 2 % mod
ay = (y//2) * (y//2 - 1) // 2 * 2 % mod
if y % 2 == 1: ay = (ay + y//2) % mod
ay = ay * x * 2 % mod
print((ax+ay) % mod)
0