| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 127195 | 谢思涵 | 求Sn的值 | C++ | Accepted | 100 | 0 MS | 248 KB | 268 | 2024-01-25 08:21:42 |
#include <iostream> using namespace std; int Sum(int a, int n) { int sum = 0, t = 0; for(int i = 1; i <= n; i++) { t = t * 10 + a; sum += t; } return sum; } int main() { int a, n; cin >> a >> n; cout << Sum(a, n) << endl; return 0; }