#34486: ddd


yp11151151@yphs.tp.edu.tw (804-36陳祈佑)

學校 : 臺北市私立延平高級中學
編號 : 197204
來源 : [203.72.178.1]
最後登入時間 :
2023-09-06 15:08:37
h659. 計程車 (Taxi) -- TOI練習賽202203新手組第2題 | From: [203.72.178.2] | 發表日期 : 2023-03-24 13:41

#include<bits/stdc++.h>
using namespace std;
int main(){
    int k,w,s,e,ans;
    while(cin>>k>>w>>s>>e){
        ans=20;
        if(k>2) ans+=(k-2)*5;
        ans+=(w/2)*5;
        if(s<=18&&e>=19) ans+=185;
        if(s<=19&&e>=20) ans+=195;
        if(s<=20&&e>=21) ans+=205;
        if(s<=21&&e>=22) ans+=215;
        if(s<=22&&e>=23) ans+=225;
        cout<<ans<<endl;
    }
    return 0;
}

 

 
ZeroJudge Forum