結果
問題 | No.2699 Simple Math (Returned) |
ユーザー | ochiaigawa |
提出日時 | 2024-03-29 21:07:46 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 467 bytes |
コンパイル時間 | 2,127 ms |
コンパイル使用メモリ | 204,132 KB |
実行使用メモリ | 6,676 KB |
最終ジャッジ日時 | 2024-03-29 21:07:52 |
合計ジャッジ時間 | 4,648 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,676 KB |
testcase_01 | AC | 50 ms
6,676 KB |
testcase_02 | AC | 96 ms
6,676 KB |
testcase_03 | AC | 46 ms
6,676 KB |
testcase_04 | WA | - |
testcase_05 | AC | 88 ms
6,676 KB |
testcase_06 | AC | 76 ms
6,676 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
ソースコード
#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; }