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 8cbb745 commit dbe7e89Copy full SHA for dbe7e89
1560A - Dislike of Threes.cpp
@@ -0,0 +1,27 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+#define ll long long
5
+
6
+// Code Written By: Vikash Patel
7
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8
9
+int main()
10
+{
11
+ int t;
12
+ cin>>t;
13
+ while(t--)
14
+ {
15
+ int k;
16
+ cin>>k;
17
+ int i=0,j=0;
18
+ while(j!=k)
19
20
+ i++;
21
+ if(i%3!=0 && i%10!=3)
22
+ j++;
23
+ }
24
+ cout<<i<<endl;
25
26
+ return 0;
27
+}
0 commit comments