Submission #30865

#TimeUsernameProblemLanguageResultExecution timeMemory
30865leejseo이상한 수열 (OJUZ10_bizarre)Cpython 2
0 / 100
20 ms3 KiB
def main(): n = int(raw_input()) s = map(int, raw_input().split()) m = int(raw_input()) s.sort() if m <= n: print s[m-1] return L = list(set(s)) c = len(L) index = n for i in range(n): if c <= s[i]: index = i if index == n: print c + m-(n+1) return diff = s[index] - c if m - (n+1) > diff: print s[index] return print c + m-(n+1) return main()
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...