結果

問題 No.1481 Rotation ABC
ユーザー convexineqconvexineq
提出日時 2021-04-16 21:50:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 639 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 82,344 KB
最終ジャッジ日時 2023-09-16 00:16:00
合計ジャッジ時間 19,703 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,232 KB
testcase_01 AC 73 ms
71,272 KB
testcase_02 AC 73 ms
71,616 KB
testcase_03 AC 74 ms
71,348 KB
testcase_04 AC 75 ms
71,640 KB
testcase_05 AC 72 ms
71,460 KB
testcase_06 AC 73 ms
71,236 KB
testcase_07 AC 73 ms
71,256 KB
testcase_08 AC 72 ms
71,320 KB
testcase_09 AC 73 ms
71,440 KB
testcase_10 AC 74 ms
71,212 KB
testcase_11 AC 71 ms
71,484 KB
testcase_12 AC 71 ms
71,320 KB
testcase_13 AC 449 ms
77,736 KB
testcase_14 AC 542 ms
77,952 KB
testcase_15 AC 438 ms
77,320 KB
testcase_16 AC 315 ms
77,088 KB
testcase_17 AC 287 ms
76,964 KB
testcase_18 AC 624 ms
79,232 KB
testcase_19 AC 272 ms
77,000 KB
testcase_20 AC 279 ms
76,948 KB
testcase_21 AC 565 ms
78,492 KB
testcase_22 AC 247 ms
76,644 KB
testcase_23 AC 760 ms
79,836 KB
testcase_24 AC 756 ms
79,444 KB
testcase_25 AC 759 ms
79,492 KB
testcase_26 AC 757 ms
79,780 KB
testcase_27 AC 784 ms
79,672 KB
testcase_28 AC 652 ms
80,388 KB
testcase_29 AC 174 ms
78,880 KB
testcase_30 AC 270 ms
82,344 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0