Untitled
user_5668965
c_cpp
a year ago
290 B
22
Indexable
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int k;
cin >> k;
for (int i = 1; ; i++)
{
if (i % 3 == 0 || i % 10 == 3)
continue;
if (--k == 0)
{
cout << i << '\n';
break;
}
}
}
}Editor is loading...
Leave a Comment