-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEuler025.cpp
40 lines (38 loc) · 990 Bytes
/
Euler025.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* ****GT_18**** */
//Motivational Source->FUHPD
#include<bits/stdc++.h>
#define MIN(a,b,c) min(min(a,b),c)
#define MAX(a,b,c) max(max(a,b),c)
#define ll long long
#define itr vector<ll int>::iterator
#define pb push_back
#define mp make_pair
#define pii pair<ll int,ll int>
#define vi vector<ll int>
#define all(a) (a).begin(),(a).end()
#define F first
#define S second
#define sz(x) (ll int)x.size()
#define hell 1000000007
#define endl '\n'
#define rep(i,a,b) for(ll int i=a;i<b;i++)
#define lbnd lower_bound
#define ubnd upper_bound
#define bs binary_search
#define phi 1.6180339887498948
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int TESTS=1;
cin>>TESTS;
while(TESTS--)
{
ll x;
cin>>x;
cout<<(ll)ceil((x-1+(log10(5)/2))/log10(phi))<<endl;
}
return 0;
}