#include #include // #pragma GCC optimize("Ofast") #define int long long using namespace std; using mint=atcoder::modint998244353; const int inf=9e18; signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); //ABC222Fをやってみよー string s;cin>>s; vector>>dp(s.size()+1,vector>(2,vector(2))); /* dp[i][j][k]:今i番目、 j=1->smaller 0->same k=1 include '8' 0->not yet */ dp[0][0][0]=1; for(int i=0;i