結果
| 問題 | No.2847 Birthday Attack |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-23 22:11:59 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 585 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 61,568 KB |
| 最終ジャッジ日時 | 2026-04-03 21:59:33 |
| 合計ジャッジ時間 | 2,032 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | WA * 14 |
ソースコード
from math import gcd
import sys, time, random
from collections import deque, Counter, defaultdict
def debug(*x):print('debug:',*x, file=sys.stderr)
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 61 - 1
x, y, mod = mi()
ans = 0
#縦
cnt = 0
for i in range(1, x + 1):
if 2 * i > x:
break
cnt += (x - 2 * i)
ans += 2 * y * cnt
ans %= mod
#横
cnt = 0
for i in range(1, y + 1):
if 2 * i > y:
break
cnt += (y - 2 * i)
ans += 2 * x * cnt
ans %= mod
print(ans)