解题思路:
注意事项:
参考代码:
while True: try: fz = [1] fm = [1] ls = [1] n = int(input()) while len(fz) < n: fz += list(range(1,ls[-1]+2)) fm += list(range(1,ls[-1]+2))[::-1] ls += list(range(1,ls[-1]+2)) fz += list(range(1,ls[-1]+2))[::-1] fm += list(range(1,ls[-1]+2)) ls += list(range(1,ls[-1]+2)) print(f"{fz[n-1]}/{fm[n-1]}") except: break
0.0分
0 人评分