結果

問題 No.1842 Decimal Point
ユーザー 37zigen37zigen
提出日時 2022-02-18 22:00:09
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 1,145 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 424 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 84,512 KB
最終ジャッジ日時 2023-09-11 19:07:31
合計ジャッジ時間 4,254 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,100 KB
testcase_01 AC 478 ms
79,412 KB
testcase_02 AC 1,145 ms
84,512 KB
testcase_03 AC 772 ms
81,200 KB
testcase_04 AC 712 ms
80,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def powmod(a, n, mod):
    if n == 0 :
        return 1
    if n % 2 == 1:
        return a*powmod(a,n-1,mod) % mod
    else:
        return powmod(a*a%mod,n//2,mod) % mod
    
T=int(input())
for i in range(T):
    A,B,C=map(int,input().split())
    v=powmod(10, C, 10 * B) * A // B % 10;
    print(v)
0