Task: | Interesting number |
Sender: | zah |
Submission time: | 2016-05-28 11:58:13 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.06 s | details |
#2 | WRONG ANSWER | 0.05 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:12:9: warning: unused variable 'n' [-Wunused-variable] int n; ^ input/code.cpp:13:9: warning: unused variable 'x' [-Wunused-variable] int x; ^ input/code.cpp:15:9: warning: variable 'alkuluvut' set but not used [-Wunused-but-set-variable] int alkuluvut[1001] = {}; ^
Code
#include <iostream>using namespace std;//ios_base::sync_with_stdio(0);//cin.tie(0);int main(){int t;cin >> t;int n;int x;int alkuluvut[1001] = {};for(int i=2; i<100; i++) {for(int j=2*i; j<1001; j+=i) alkuluvut[j]=1;}/*for(int i=0; i<t; t++) {cin >> n;for(int j=0; j<n; j++) {cin >> x;if(x>99){if(x/100==x%10){ //palindromiif(alkuluvut[x]==0){cout << x;break;}}}if(x>9){if(x/10==x%10){if(alkuluvut[x]==0){cout << x;break;}}} else {if(alkuluvut[x]==0){cout << x;break;}}}}*/}