Submission

Status:

PPPPPP-PP-

Subtask/Task Score:

80/100

Score: 80

User: nunos

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

Language: cpp

Time: 0.004 second

Submitted On: 2025-09-29 18:52:27

#include <iostream>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int count=0;
    int x;cin>>x;
    for(int i=1;i<=x;i++){
        for(int j=1;j<=x;j++){
            if(i%j==0) count++;
        }
        if(count==2) cout << i<<"\n";
        count=0;
    }
    return 0;
}