Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
129852 | 陈航 | 求Sn的值 | C++ | Accepted | 100 | 0 MS | 244 KB | 173 | 2024-01-27 11:44:43 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,n,x,s=0;; cin>>a>>n; x=a; for(int i=1;i<=n;i++){ s+=a; a=a*10+x; } cout<<s; return 0; }