Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- const int maxn = 1000 + 100;
- int cnt;
- bool isPrime(int x) {
- if (x < 2) {
- return false;
- }
- for (int i = 2; i <= x / i; ++i) {
- if (x % i == 0) {
- return false;
- }
- }
- return true;
- }
- int main() {
- #ifdef ExRoc
- freopen("test.txt", "r", stdin);
- #endif // ExRoc
- for (int i = 0; i < 100000; ++i) {
- if (isPrime(i)) {
- ++cnt;
- if (cnt == 2025) {
- cout << i << endl;
- return 0;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement