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

Tests(10/10):


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


测评信息: