验证中...
gistfile1.txt
Raw Copy
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Author : y
@License : (C) Copyright 2013-2019, HJIMI
@Contact : bj-yez-magzine@163.com
@File : calc.py
@Time : 2019-06-28 18:35
@Desc : 由于除法本身的精度限制,为了能精确显示小数点后多少多少位(由times决定),就写了个脚本
'''
import sys
if __name__=='__main__':
r = ''
times = 100
a = int(sys.argv[1])
b = int(sys.argv[2])
print(a,b)
for i in range(times):
while a < b:
a = a * 10
r = r + str(int(a/b))
a = a % b
print(r)

Comment list( 0 )

You need to Sign in for post a comment

Help Search