Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
129846 李轩智hhdxxf 求Sn的值 C++ Accepted 100 0 MS 268 KB 187 2024-01-27 11:41:30

Tests(5/5):


#include<bits/stdc++.h> 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; }


Judgement Protocol: