結果
| 問題 | No.2649 [Cherry 6th Tune C] Anthem Flower |
| コンテスト | |
| ユーザー |
arad
|
| 提出日時 | 2024-02-23 21:50:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 410 ms / 2,000 ms |
| コード長 | 222 bytes |
| 記録 | |
| コンパイル時間 | 351 ms |
| コンパイル使用メモリ | 85,384 KB |
| 実行使用メモリ | 81,552 KB |
| 最終ジャッジ日時 | 2026-04-15 16:43:42 |
| 合計ジャッジ時間 | 6,721 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
import sys
sys.set_int_max_str_digits(0)
t = int(input())
for ti in range(t):
x,m = map(int,input().split())
y = x+1
if x%2==0:
x //= 2
else:
y //= 2
x %= m
y %= m
print((x*y)%m)
arad