Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
442009 李韩韬 【C5-1】分段函数 C++ 通过 100 1 MS 244 KB 259 2026-05-27 21:02:27

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int a[10086]; int hsg(int x){ if(x<1){ return x; } if(1<=x&&x<10){ return 2*x-1; } if(x>=10){ return 3*x-11; } } int main() { int n; cin>>n; cout<<hsg(n); return 0; }


测评信息: