11 条题解
-
0
Guest
- 1
信息
- ID
- 26
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 168
- 已通过
- 107
- 上传者
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin>>a;
if(a<=1)
{
cout<<1.5;
}
else
{
cout<<fixed<<setprecision(1)<<1.5+0.8*(a-1);
}
return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ double n; cin>>n; if(n<=1)cout<<1.5; else cout<<(n-1)*0.8+1.5; return 0; }
#include<bits/stdc++.h> using namespace std; int main() { double x,y; cin>>x; if(x<=1) { cout<<1.5; } else { y=1.5+0.8*(x-1); cout<<fixed<<setprecision(2)<<y; } return 0; }
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a<=1) { cout<<1.5;
}
else
{
cout<<fixed<<setprecision(1)<<1.5+0.8*(a-1);
}
return 0;
}
#include<bits/stdc++.h> using namespace std; int main() {double a,b,c; cin>>a; if(a>0&&a<=1) {cout<<fixed<<setprecision(1)<<1.5; } if(a>1) {cout<<fixed<<setprecision(1)<<1.51+0.8(a-1); } return 0; }
注册一个 PYYG 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。