forked from Prashanthsrn/Competitive-Coding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDYNAMO.cpp
More file actions
46 lines (34 loc) · 640 Bytes
/
Copy pathDYNAMO.cpp
File metadata and controls
46 lines (34 loc) · 640 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
46
#include <iostream>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int n;
cin >> n;
long long unsigned int a;
cin >> a;
long long unsigned int temp = 1;
for(int i = 0; i < n; i++){
temp = temp * 10;
}
long long unsigned int s = a + 2 * temp ;
cout << s << endl;
fflush(stdout);
long long unsigned int b;
cin >> b;
long long unsigned int c = temp - b;
cout << c << endl;
fflush(stdout);
long long unsigned int d;
cin >> d;
long long unsigned int e = temp - d;
cout << e << endl;
fflush(stdout);
int correct;
cin >> correct;
if(correct == -1){
break;
}
}
}