题解 | #牛牛的快递#
牛牛的快递
https://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270
#include<iostream>
using namespace std;
int main()
{
float f;
char c;
int ans;
scanf("%f %c",&f,&c);
if(f<=1)
ans=20;
else if(f==(int)f)
ans=f+19;
else ans=f+20;
if(c=='y')
ans+=5;
cout<<ans;
}
using namespace std;
int main()
{
float f;
char c;
int ans;
scanf("%f %c",&f,&c);
if(f<=1)
ans=20;
else if(f==(int)f)
ans=f+19;
else ans=f+20;
if(c=='y')
ans+=5;
cout<<ans;
}