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 03bad46 commit f6a0fb1Copy full SHA for f6a0fb1
strange_counter.cpp
@@ -0,0 +1,27 @@
1
+# include <bits/stdc++.h>
2
+
3
+#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
4
+#define f(i,a,b) for(i=a;i<b;i++)
5
+#define fr(i,a,b) for(i=a;i>=b;i--)
6
+#define endl '\n'
7
+#define ll long long int
8
+#define ff first
9
+#define ss second
10
+#define pb push_back
11
+#define mp make_pair
12
+#define mod 1000000007
13
14
+using namespace std;
15
16
+int main()
17
+{
18
+ ll t, pts = 3;
19
+ cin>>t;
20
+ while(t > pts)
21
+ {
22
+ t -= pts;
23
+ pts *= 2;
24
+ }
25
+ cout<<pts - t + 1;
26
27
+}
0 commit comments