結果

問題 No.1842 Decimal Point
ユーザー boatmusclesboatmuscles
提出日時 2022-02-18 22:37:46
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 40,624 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-11 19:39:33
合計ジャッジ時間 1,258 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 38 ms
4,380 KB
testcase_02 AC 67 ms
4,380 KB
testcase_03 AC 61 ms
4,376 KB
testcase_04 AC 54 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include<atcoder/modint>
using namespace atcoder;
using mint = modint;

int main(){
    int testcase_i;
    scanf("%d", &testcase_i);
    for (int ___ = 0; ___ < testcase_i; ___++){
        int A, B, C;
        scanf("%d %d %d", &A, &B, &C);
        mint::set_mod(B);
        printf("%llu\n", (mint(A)*mint(10).pow(C-1)).val()*10ULL/B);
    }
    return 0;
}
0