結果
問題 |
No.1481 Rotation ABC
|
ユーザー |
![]() |
提出日時 | 2021-04-16 21:50:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 214 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 82,388 KB |
実行使用メモリ | 87,296 KB |
最終ジャッジ日時 | 2024-07-03 01:22:26 |
合計ジャッジ時間 | 12,611 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 10 |
ソースコード
n = int(input()) s = input() from math import factorial as f ans = f(len(s)) for i in "ABC": c = s.count(i) if c: ans //= f(c) else: print(1) exit() print((ans-len(s))%998244353)