Editorial for Bedao Grand Contest 04 - ZEZE
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Code mẫu
#include <bits/stdc++.h> using namespace std; #define tag "ZEZE" #define forinc(i,a,b) for(int i=a;i<=b;i++) #define checkfile(FiLeNaMe) { if(fopen(FiLeNaMe".inp","r")) freopen(FiLeNaMe".inp","r",stdin),freopen(FiLeNaMe".out","w",stdout); } void enter(){ int m,n; int fi=0,tw=0; cin>>m; forinc(i,1,m){ cin>>n; while(n%2==0) ++tw,n/=2; while(n%5==0) ++fi,n/=5; } cout<<min(tw,fi); } void solve(){ } signed main(){ checkfile(tag) ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); enter(); solve(); return 0; }
Comments