CSES - Creating Strings II
Xem dạng PDF
Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
512M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given a string, your task is to calculate the number of different strings that can be created using its characters.
Input
- The only input line has a string of length ~n~. Each character is between a–z.
Output
- Print the number of different strings modulo ~10^9+7~.
Constraints
- ~1 \le n \le 10^6~
Example Input
aabac
Example Output
20
Bình luận