CSES - HIIT Open 2016 - Results
Submission details
Task:Interesting number
Sender:ContinuedLife
Submission time:2016-05-28 12:08:28 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#10.16 sdetails
#20.15 sdetails

Code

#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(6);

using namespace std;

int main(){ _
	int ans[20] = {2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929};
	//set<int> si;
//	for(int i = 0; i < 21; ++i)	si.insert(anss[i]);
	
	int TC;	cin >> TC;
	while(TC--){
		int n, num;	cin >> n;
		for(int i = 0; i < n; ++i){
			cin >> num;
			for(int j = 0; j < 21; ++j)
				if(ans[j] == num)	cout << num << endl;
		}
	}

	return 0;
}

Test details

Test 1

Verdict:

input
1000
9
300 988 956 931 116 3 386 202 ...

correct output
3
3
181
919
191
...

user output
(empty)

Test 2

Verdict:

input
1
100000
72 247 605 249 10 422 594 490 ...

correct output
191

user output
(empty)