Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
336133 123456 【C3-9】电梯升降 C++ 通过 100 9 MS 252 KB 236 2025-07-25 16:58:48

Tests(10/10):


#include<iostream> using namespace std; int main(){ int n,x,t,c; while(cin>>n,n){ c=0; t=0; while(n--){ cin>>x; t+=5; if(x>c) t+=(x-c)*6; else t+=(c-x)*4; c=x; } cout<<t<<endl; } return 0; }


测评信息: