結果

問題 No.2847 Birthday Attack
ユーザー shobonvip
提出日時 2024-08-23 22:55:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 257 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 54,352 KB
最終ジャッジ日時 2024-08-23 22:55:57
合計ジャッジ時間 2,159 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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