Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: jamesz
Problemset: จำนวนเฉพาะ (2560)
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-25 23:20:14
#include<bits/stdc++.h>
using namespace std;
int main(){
int t,count = 0; cin>>t;
int count2;
for(int i = 2; i<t; i++){
for(int j = 1; j<t; j++){
if(i%j == 0){
count++;
count2 = i;
}
}
if(count == 2){
cout<<count2<<"\n";
}
count = 0;
}
}