Run ID:160669
提交时间:2026-09-26 09:49:30
m,n=map(int,input().split()) there=False lis=[] 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): lis.append(str(k)) there=True print(",".join(lis)) if not(there): print("No")