結果
問題 | No.3145 Astral Parentheses Sequence |
ユーザー |
![]() |
提出日時 | 2025-05-16 23:14:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 208 bytes |
コンパイル時間 | 550 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2025-05-16 23:14:43 |
合計ジャッジ時間 | 3,528 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 45 |
ソースコード
from math import comb def solve(n, m): if n % 3 != 0: return 0 k = n // 3 result = comb(3 * k, k) // (2 * k + 1) return result % m n, m = map(int, input().split()) print(solve(n, m))