https://codeforces.com/problemset/problem/A1350A/

Can someone tell me why I am getting a tle error

t = int(input())

for i in range(t):

n , k = list(map(int,input().strip().split()))`def second(a): for i in range(2, a + 1): if a % i == 0: b = i break else: continue return b for i in range(k): c = n fn = second(c) n = n + fn c = n print(c)`