diff --git a/2024/05/29-05-24-Exam/a.py b/2024/05/29-05-24-Exam/a.py new file mode 100644 index 0000000..94fdd1d --- /dev/null +++ b/2024/05/29-05-24-Exam/a.py @@ -0,0 +1,11 @@ +def main(): + n, stu_num = map(int, input().split()) + res = [list(map(int, input().split())) for _ in range(n)] + + res.sort(key=lambda x:x[1], reverse=True) + dico = {res[i][0]:i+1 for i in range(len(res))} + print(dico[stu_num]) + + +for _ in range(int(input())): + main() \ No newline at end of file diff --git a/2024/05/29-05-24-Exam/b.py b/2024/05/29-05-24-Exam/b.py new file mode 100644 index 0000000..0885e02 --- /dev/null +++ b/2024/05/29-05-24-Exam/b.py @@ -0,0 +1,25 @@ +import math +def isPrime(num): + if(num==1): + return False + if(num==2): + return True + if(num%2==0): + return False + + i = 3 + while(i