2017-9 CCF 打酱油(100分)
作者:互联网
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int max=0;
int a,b,c;
if(n<30)
max=n/10;
else if(n>=30&&n<50)
max=4+(n-30)/10;
else
{
a=n/50;
b=(n-a*50)/30;
c=(n-a*50-b*30)/10;
max=a*7+b*4+c;
}
cout<<max;
return 0;
}
标签:std,main,int,max,30,2017,CCF,100 来源: https://blog.csdn.net/m0_49365876/article/details/122850143