Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
344891 王铖渝 【C2-3】加权数字和 C++ 通过 100 3 MS 244 KB 186 2025-08-28 14:38:10

Tests(2/2):


#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0,i=1; cin>>n; while(n){ sum+=n%10*i; n/=10; i++; } cout<<sum<<endl; return 0; }


测评信息: