Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
127227 | 黄恩宁 | 求Sn的值 | C++ | 通过 | 100 | 0 MS | 264 KB | 213 | 2024-01-25 08:26:23 |
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { int a,n,i,j,s=0; cin>>a>>n; for(i=1;i<=n;i++) for(j=1;j<=i;j++) s+=a*pow(10,j-1); cout<<s<<endl; return 0; }