Cod sursa(job #2854490)

Utilizator andrei9cBogdan Andrei andrei9c Data 21 februarie 2022 14:14:25
Problema Teren Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <iostream>

using namespace std;

int main()
{
    int n,i,x,og,y,ok,j,c;
    long long s;
    cin>>n;
    s=0;
    for(i=1;i<=n;i++){
        cin>>x;
        og=0;
        y=x;
        while(y!=0){
            og=og*10+y%10;
            y=y/10;
        }
        ok=1;
        if(og<2)
            ok=0;
        for(j=2;j*j<=og;j++){
            if(og%j==0)
                ok=0;
        }
        if(ok==1)
            s=s+;

    }
    cout<<s;
    return 0;
}