Submission #20177997
Source Code Expand
import collections
N = input()
S = input()
C = collections.Counter(list(S))
ans = 1
for i in C.values():
ans=ans*(i+1)%(10**9+7)
print(ans-1)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Colorful Subsequence |
| User | H20 |
| Language | PyPy3 (7.3.0) |
| Score | 200 |
| Code Size | 152 Byte |
| Status | AC |
| Exec Time | 75 ms |
| Memory | 69756 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt |
| All | 01-00.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, sample-01.txt, sample-02.txt, sample-03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-00.txt | AC | 75 ms | 69420 KiB |
| 01-01.txt | AC | 67 ms | 69644 KiB |
| 01-02.txt | AC | 65 ms | 69724 KiB |
| 01-03.txt | AC | 57 ms | 64352 KiB |
| 01-04.txt | AC | 57 ms | 64556 KiB |
| 01-05.txt | AC | 55 ms | 64440 KiB |
| 01-06.txt | AC | 68 ms | 69456 KiB |
| 01-07.txt | AC | 65 ms | 69312 KiB |
| 01-08.txt | AC | 68 ms | 69380 KiB |
| 01-09.txt | AC | 65 ms | 69756 KiB |
| sample-01.txt | AC | 57 ms | 64436 KiB |
| sample-02.txt | AC | 62 ms | 64596 KiB |
| sample-03.txt | AC | 59 ms | 64852 KiB |