結果

問題 No.1842 Decimal Point
ユーザー boatmusclesboatmuscles
提出日時 2022-02-18 22:37:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 37,248 KB
最終ジャッジ日時 2025-01-28 00:23:03
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%d", &testcase_i);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~
main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%d %d %d", &A, &B, &C);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

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