Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149983 黄俊仪 11计算分段函数的值 C++ Wrong Answer 1 MS 272 KB 272 2026-03-21 15:47:55

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { double k; cin>>k; if(k<5&&k>=0) { cout<<-k+2.5; return 0; } if(k<10&&k>=5) { cout<<2-1.5*(k-3)*2; return 0; } if(k<20&&10>=5) { cout<<k/2-1.5; return 0; } return 0; }


Run Info:

------Input------
17.6
------Answer-----
7.300
------Your output-----
7.3