-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphantom3.cpp
More file actions
45 lines (37 loc) · 792 Bytes
/
phantom3.cpp
File metadata and controls
45 lines (37 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _MSC_VER
#include <bits/stdc++.h>
#else
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <unordered_map>
#include <queue>
#include <regex>
#define scanf scanf_s
#endif
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MAXN 100000//1e5
#define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0)
char _;
using namespace std;
ll start, high, front,idx;
//ll prime[455052552];
regex p(".?|(..+?)\\1+");
int main() {
scan(start);scan(high);
//prime[0] = 2;
//prime[1] = 3;
idx = 2;
for (ll i = 1;i <= high;i++) {
if (regex_match(new char[i], p)) {
printf("%lld\n", i);
}
}
return 0;
}