diff --git a/Codeforces_1560A.cpp b/Codeforces_1560A.cpp new file mode 100644 index 0000000..a89d575 --- /dev/null +++ b/Codeforces_1560A.cpp @@ -0,0 +1,43 @@ +#include +#define ll long long int + +using namespace std; + +vector v; + +void preComputation() +{ + for (int i = 1; i <= 2000; i++) + { + if (i % 3 == 0 || i % 10 == 3) + { + //nothing + } + else + { + v.push_back(i); + } + } +} + +void solve() +{ + ll n; + cin >> n; + cout << v[n - 1] << "\n"; +} + +int main() +{ + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + preComputation(); + + ll t; + cin >> t; + while (t--) + { + solve(); + } +} \ No newline at end of file