#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
double w;
while(cin>>n&&n) {
w=0;
if(n<=4) w=10;
if(n>4&&n<=8) w=10+(n-4)*2;
if(n>8) {
while(n>8) {
w+=18;
n-=8;
}
if(n<=4) w+=n*2.4;
else
w+=10+(n-4)*2;
}
if(w-(int)w!=0) printf("%.1f\n",w);
else
printf("%d\n",(int)w);
}
return 0;
}
XYOJ1234出租车费
猜你喜欢
转载自blog.csdn.net/qq_39564498/article/details/81206102
今日推荐
周排行