We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 693f07b commit d1cf50cCopy full SHA for d1cf50c
1560A.cpp
@@ -0,0 +1,25 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+
4
+int main(){
5
+ int t;
6
+ cin>>t;
7
+ int n;
8
+ while(t--){
9
+ cin>>n;
10
+ int ans;
11
+ int i = 0, j = 1;
12
+ while(i != n){
13
+ if(j%3 != 0 && j % 10 != 3){
14
+ ans = j;
15
+ j++;
16
+ }
17
+ else{
18
19
+ continue;
20
21
+ i++;
22
23
+ cout<<ans<<endl;
24
25
+}
0 commit comments