結果
| 問題 |
No.1177 余りは?
|
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-05-10 20:13:31 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 1,000 ms |
| コード長 | 379 bytes |
| コンパイル時間 | 1,981 ms |
| コンパイル使用メモリ | 195,348 KB |
| 最終ジャッジ日時 | 2025-02-21 12:10:47 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 32 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/modint>
using namespace std;
using mint = atcoder::modint1000000007;
void fast_io() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
int main() {
fast_io();
int p, k;
cin >> p >> k;
mint ans = mint(10).pow(p - 1) - 1;
ans /= p;
if (k == 0) {
ans++;
}
cout << ans.val() << endl;
}
eve__fuyuki