python还有一个数据爆红求助

P1055 [NOIP2008 普及组] ISBN 号码

explorer007 @ 2022-11-25 19:25:02

a, b, c, d = map(int and str, input().split('-')) p = str(a) q = str(b) r = str(c) s = str(d) l_1 = list(p) l_2 = list(q) l_3 = list(r) sums = 0 li = l_1 + l_2 + l_3 for i in range(9): f = int(li[i]) i += 1 sums = sums + i * f extra = sums % 11 if extra == 10: extra = 'X' if str(extra) == s: print('Right') else: print(f"{p}-{q}-{r}-{extra}")


by z_y_ @ 2022-11-25 19:54:57

希丰展,使MD


by wuyuchen5001143 @ 2023-01-05 21:46:03

您没有用Markdown


|