Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define gc c=getchar()
- #define r(x) read(x)
- #define ll long long
- template<typename T>
- inline void read(T&x){
- x=0;T k=1;char gc;
- while(!isdigit(c)){if(c=='-')k=-1;gc;}
- while(isdigit(c)){x=x*10+c-'0';gc;}x*=k;
- }
- const int N=6;
- int cnt[N];
- int denomination[]={1, 5, 10, 20, 50, 100};
- int main(){
- // freopen(".in","r",stdin);
- // freopen(".out","w",stdout);
- int mx=0;
- for(int i=0;i<N;++i){
- r(cnt[i]);
- if(denomination[i]*cnt[i]>=denomination[mx]*cnt[mx])mx=i;
- }
- printf("%d\n",denomination[mx]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement