結果
問題 |
No.2021 Not A but B
|
ユーザー |
|
提出日時 | 2022-08-21 06:30:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 94,332 KB |
最終ジャッジ日時 | 2024-10-09 21:06:46 |
合計ジャッジ時間 | 3,824 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 17 WA * 9 |
ソースコード
n = int(input()) S = input() se = set() for i in range(1, n): lst = [] if S[i - 1] == "A": lst.append(i - 1) if S[i] == "A": lst.append(i) tot = 0 for l in lst: tot *= n tot += l se.add(tot) print(len(se))