結果

問題 No.2699 Simple Math (Returned)
ユーザー ochiaigawa
提出日時 2024-03-29 21:07:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 2,071 ms
コンパイル使用メモリ 196,068 KB
最終ジャッジ日時 2025-02-20 14:41:31
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/modint>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
using mint = atcoder::modint998244353;
int main() {
  cin.tie(0); cout.tie(0);
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while(T--) {
    int N, M;
    cin >> N >> M;
    if(N % (M * 2) == 0) {
      cout << 0 << '\n';
    } else {
      cout << (mint(10).pow(N % (M * 2)) - 1).val() << '\n';
    }
  }
  return 0;
}
0