Run ID:160666
提交时间:2026-09-26 09:45:58
m,n=map(int,input().split()) there=False def f(x): if x == 1: return False if x == 2: return True if not(x % 2): return False for i in range(3,int(x ** 0.5)+1,2): if not(x % i): return False return True for k in range(m,n+1): opposite=int(str(k)[::-1]) if f(k) and f(opposite): print(k,end=",") there=True if not(there): print("No")