Submission

Status:

PPPPPP-PP-

Subtask/Task Score:

80/100

Score: 80

User: dentenplay5555

Problemset: จำนวนเฉพาะ (2560)

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-04 14:38:09

#include <iostream>
#include <set>
using namespace std;
int main() {
    int n;cin>>n;bool e=0;
    for (int o=2;o<=n;o++){
        for(int i=2;i*i<=o;i++)if(o%i==0)e=e||1;
        if (!e)cout<<o<<'\n';
        e=0;
    }
}