Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: boss
Problemset: จำนวนเฉพาะ (2560)
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-26 16:55:46
#include <bits/stdc++.h>
using namespace std;
int main()
{
int arr[]= {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 n;
cin >> n;
for(int i=0;i<25;i++)
{
if(arr[i]<n)
{
cout << arr[i]<<endl;
}
else
{
break;
}
}
return 0;
}