1 条题解
-
0
C++ :
#include <iostream> #include <cstdio> using namespace std; int main() { double w,p; cin>>w; if(w<=10){ p=w*2.5; } else{ p=(w-10)*4+25; } printf("%0.1f\n",p); return 0; }Pascal :
var m,n:real; begin read(n); if n>10 then m:=10*2.5+(n-10)*4 else m:=n*2.5; write(m:0:1); end.
- 1
信息
- ID
- 1898
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者