No.1195 I Want to Love Counting (String Edition)
レベル :
/ AI推定難易度 : 1925
/ 実行時間制限 : 1ケース 3.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 63
作問者 :
sanada_atcoder
/ テスター :
kaage
タグ : / 解いたユーザー数 63
作問者 :
sanada_atcoder
/ テスター :
kaage
問題文最終更新日: 2020-08-22 13:02:29
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
技術室奥プログラミングコンテスト#5 Day1
(順位表)
の他の問題:
Problem Statement
You are given a string $S$ consisting only of lowercase English letters.
How many distinct strings can be constructed by taking some characters (at least $1$) from $S$ and arranging them in any order?
Find the answer modulo $998244353$.
Input
$S$
$1 \le |S| \le 3×10^5$
$S$ consists only of lowercase English letters.
Output
Print a newline at the end. Find the answer modulo $998244353$.
Sample
Sample 1
Input
yuu
Output
8
The $8$ strings that can be constructed are y,u,yu,uy,uu,yuu,uyu,uuy.
Sample 2
Input
sanada
Output
363
Sample 3
Input
kaguyasamaloveiswar
Output
634980099
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。