༺༽༾ཊ阚琪钦ཏ༿༼༻ • 17天前
评论:
#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
while(cin>>n&&n!=0){
if(n<=4){
cout<<10<<endl;
continue;
}
double ans=n/8*18;
n%=8;
if(n<=4) ans+=n*2.4;
else ans=ans+10+(n-4)*2;
int t=ans;
if(ans-t!=0) printf("%.1lf",ans);
else cout<<t;
cout<<endl;
}
return 0;
}