Kickstart试水
Posted marigolci
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Kickstart试水相关的知识,希望对你有一定的参考价值。
t = int(input()) for _ in range(1, t + 1): n=int(input()) ans=[] num = [int(s) for s in input().split(" ")] tmp=[] for i in range(n): tmp.append(num[i]) n1=len(tmp) tmp.sort() for val in tmp: if val<n1: n1-=1 else: continue ans.append(n1) y=‘ ‘.join(str(i) for i in ans) print("Case #{}: {}".format(_, y))
times = int(input()) for ti in range(times): n=int(input()) str1 = input() ans=[] num = [int(nt) for nt in str1.split()] tmp=[] for i in range(n): tmp.append(num[i]) n1=len(tmp) tmp.sort() for val in tmp: if val<n1: n1-=1 else: continue ans.append(n1) y=‘ ‘.join(str(i) for i in ans) print("Case #{}: {}".format(ti+1, y), flush=True)
以上是关于Kickstart试水的主要内容,如果未能解决你的问题,请参考以下文章