結果
問題 |
No.2772 Appearing Even Times
|
ユーザー |
👑 |
提出日時 | 2024-05-27 23:36:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,538 ms / 4,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 357 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 157,160 KB |
最終ジャッジ日時 | 2024-12-20 20:41:51 |
合計ジャッジ時間 | 19,170 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
R=range S=input() L=len(S) p=1024 D=[[0]*p for l in R(L)] D[0][0]=1 P=998244353 for l in R(1,L): for s in R(p): for d in R(10):t=s^1<<d;D[l][t]=(D[l][t]+D[l-1][s])%P a=sum(D[l][0]-D[l-1][1]for l in R(1,L)) t=0 for i in R(L): c=ord(S[i])-48 for d in R(i<1,c):a+=D[L-1-i][t^1<<d] t^=1<<c print((a+(t<1))%P)