Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int fives(int n)
- {
- int k=(log(n)/log(5));
- //cout<<k;
- return ((1-(pow(0.2,k)))/4)*n;
- }
- int main()
- {
- int n;
- cin>>n;
- vector<int> v;
- for(int i=0;i<n;i++)
- {
- int temp;
- cin>>temp;
- v.push_back(fives(temp));
- }
- for(auto x:v)
- {
- cout<<x<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement