結果

問題 No.2905 Nabeatsu Integration
ユーザー amentorimaru
提出日時 2024-08-13 15:00:08
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 3,641 ms
コンパイル使用メモリ 180,392 KB
実行使用メモリ 12,316 KB
最終ジャッジ日時 2024-09-07 11:33:21
合計ジャッジ時間 7,763 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 70
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
using namespace std;

using ll = long long;
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;


int main() {
  string s;
  cin >> s;
  auto r = z_algorithm(s);
  mint ans = 0;
  mint add = 10;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (r[i] + i == s.size())
      ans += add;
    add *= 10;
  }
  ans -= s.size() - 1;
  cout << ans.val();
  return 0;
}
0