結果

問題 No.1842 Decimal Point
ユーザー GrayCoderGrayCoder
提出日時 2022-02-18 22:18:32
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 374 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 234,904 KB
最終ジャッジ日時 2024-06-29 09:10:16
合計ジャッジ時間 6,603 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    T = int(input())
    for _ in [0] * T:
        A, B, C = map(int, input().split())
        getcontext().prec = C + 1
        x = str(Decimal(A) / Decimal(B)).split(".")
        if len(x[1]) < C:
            print(0)
        else:
            print(x[1][C - 1])


main()
0