def compute_gcd(num1, num2):
if num1%num2 == 0:
return num2
return compute_gcd(num2, num1 % num2)
def fillingprime(N): #에라토네스의 체~N
raw = set([x for x in range(N+1)])
raw -= set(range(0,2))
for i in range(2, int(max(raw)**0.5)+1):
raw -= set(range(i*2, max(raw)+1, i))
return list(raw)
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstdlib>
using namespace std;
int main() {
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(false);
}
vector<long long> prime;
void fillingPrime(long long N) {
vector<int> raw(N + 1);
for (int i = 2; i < N; i++) {
raw[i] = i;
}
for (long long i = 2; i*i < N; i++) { //에라토네스의 체
if (raw[i] == 0) continue;
for (int j = i + i; j < N; j += i) {
raw[j] = 0;
}
}
for (int i = 2; i < N; i++) {
if (raw[i] != 0)
prime.push_back(raw[i]);
}
}
vector<long long> split(string& s, char delimiter) {
vector<long long> int_tokens;
string token;
istringstream tokenStream(s);
while (getline(tokenStream, token, delimiter)) {
stringstream ss(token); //each element, string to int
long long n;
ss >> n;
int_tokens.push_back(n);
}
return int_tokens;
}