結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,272 KB
testcase_01 WA -
testcase_02 AC 68 ms
71,360 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 67 ms
71,688 KB
testcase_09 AC 67 ms
71,420 KB
testcase_10 AC 67 ms
71,488 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 446 ms
77,588 KB
testcase_14 AC 527 ms
77,528 KB
testcase_15 AC 428 ms
77,616 KB
testcase_16 AC 306 ms
77,060 KB
testcase_17 AC 281 ms
76,952 KB
testcase_18 AC 611 ms
79,324 KB
testcase_19 AC 271 ms
77,120 KB
testcase_20 AC 271 ms
76,988 KB
testcase_21 AC 554 ms
78,580 KB
testcase_22 AC 242 ms
76,860 KB
testcase_23 AC 751 ms
79,940 KB
testcase_24 AC 750 ms
79,640 KB
testcase_25 AC 750 ms
79,776 KB
testcase_26 AC 751 ms
79,696 KB
testcase_27 AC 752 ms
79,796 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
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