Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: kusir_laman
Problemset: จำนวนเฉพาะ (2560)
Language: cpp
Time: 0.002 second
Submitted On: 2026-08-22 23:11:38
#include <bits/stdc++.h>
using namespace std;
int n,i;
int prime_table[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
int size = sizeof(prime_table) / sizeof(prime_table[0]);
for(int i=0;i<size;i++){
if(prime_table[i]>=n){
break;
}
cout << prime_table[i] << "\n";
}
}