Kirito


私信TA

用户名:kiritoR

访问量:402

签 名:

等  级
排  名 9833
经  验 1105
参赛次数 0
文章发表 1
年  龄 0
在职情况 学生
学  校 南昌大学
专  业

  自我简介:

解题思路:

注意事项:

参考代码:

p,q = map(int,input().split())
a = int(input())
a = int(a/(10**q) * 10**q - int(a/(10**q) * 10**(p-1)))
b = 10**q - 10**(p-1)

son = a
mother = b
c = b % a
#求a.b最大公约数进行约分
while c:
   b = a
   a = c
   c = b%a

print(int(son/a),end=' ')
print(int(mother/a))

 

0.0分

6 人评分

  评论区

  • «
  • »