Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Catpao

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-22 19:00:04

#include<iostream>
using namespace std;
int main()
{
	int n,b;
	cin>>n;
	bool a = false;
	for(int i=2;i<n;i++){
		b = i;
		for(int j=2;j<b;j++){
			if(b%j == 0){
				a = true;
			}
		}
		if(a == false){
			cout<<b<<"\n";
		}
		a = false;
	}
}