Advertisement
roronoa

max nombres premiers

Nov 11th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. N=readline()
  2. t=[]
  3. p=x=>{for(j=2;j<x;j++)if(x%j==0)return 0
  4. return 1}
  5. for(i=0;i<N;i++)t.push(readline()*1)
  6. print(t.filter(a=>p(a)).sort((a,b)=>b-a)[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement