結果

問題 No.25 有限小数
ユーザー tabataba
提出日時 2016-04-13 06:13:15
言語 Python2
(2.7.18)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 9,560 KB
最終ジャッジ日時 2023-08-09 22:59:09
合計ジャッジ時間 2,416 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
9,468 KB
testcase_01 AC 48 ms
9,520 KB
testcase_02 AC 45 ms
9,528 KB
testcase_03 AC 15 ms
9,384 KB
testcase_04 AC 16 ms
9,396 KB
testcase_05 AC 16 ms
9,412 KB
testcase_06 AC 16 ms
9,420 KB
testcase_07 AC 45 ms
9,524 KB
testcase_08 AC 16 ms
9,532 KB
testcase_09 AC 16 ms
9,416 KB
testcase_10 AC 16 ms
9,352 KB
testcase_11 AC 45 ms
9,464 KB
testcase_12 AC 16 ms
9,560 KB
testcase_13 AC 16 ms
9,516 KB
testcase_14 AC 16 ms
9,516 KB
testcase_15 AC 45 ms
9,520 KB
testcase_16 AC 17 ms
9,452 KB
testcase_17 AC 16 ms
9,532 KB
testcase_18 AC 16 ms
9,344 KB
testcase_19 AC 82 ms
9,408 KB
testcase_20 AC 45 ms
9,344 KB
testcase_21 AC 45 ms
9,412 KB
testcase_22 AC 16 ms
9,516 KB
testcase_23 AC 16 ms
9,400 KB
testcase_24 AC 16 ms
9,420 KB
testcase_25 AC 81 ms
9,532 KB
testcase_26 AC 46 ms
9,532 KB
testcase_27 AC 46 ms
9,408 KB
testcase_28 AC 81 ms
9,424 KB
testcase_29 AC 81 ms
9,412 KB
testcase_30 AC 83 ms
9,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=input()
m=input()
o=n%m
b=n/m
for i in range(114514):
	if o==0:
		print str(b).rstrip("0")[-1]
		break
	o*=10
	b=o/m
	o=o%m
else:
	print -1
0