Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
127204 | 陈道宁 | 求Sn的值 | C++ | 解答错误 | 20 | 0 MS | 244 KB | 220 | 2024-01-25 08:23:28 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,temp; cin>>a>>b; int ans=0; temp=a; for(int i=1;i<=b;i++){ ans+=temp; for(int j=1;j<=i;j++){ temp=temp*10+a; } } cout<<ans; }