Submission

Status:

----P---P-

Subtask/Task Score:

20/100

Score: 20

User: eefirefire

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-03 18:39:35

#include <bits/stdc++.h>

using namespace std;

int main(){
    int n;
    cin >> n;

    for(int i = 0; i <= n;i ++){
        if(i % 2 != 0 && i %3 != 0 & i % 5 != 0 && i != 1 || i ==2 || i ==3 || i == 5){
            cout << i << "\n";
        }
    }
}