Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define pb push_back
- #define mp make_pair
- #define sz size
- #define ll long long
- #define ld long double
- #define fs first
- #define sc second
- #define forn(i, f, t) for(int i = f; i < t; i++)
- #define all(x) (x).begin(), (x).end()
- #define ins insert
- const int INF = 2147483647;
- const int MOD = 1000000007;
- const ll INF64 = 9223372036854775807;
- const ld EPS = 1e-7;
- using namespace std;
- char res[10];
- bool req(int k){
- printf("%d\n", k);
- fflush(stdout);
- scanf("%s", res);
- return (res[0] == 'y');
- }
- int main(){
- int fl = 0;
- vector<int> a = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 4, 9, 25, 36, 49};
- forn(i, 0, a.sz()) fl += req(a[i]);
- printf(fl > 1 ? "composite\n" : "prime\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement