#include <bits/stdc++.h> using namespace std; int n, a[105];
int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) { cout << i << ":"; for (int j = 1; j <= a[i]; j++) { cout << "*"; } cout << endl; } return 0; }
使用您的 蒙青创OJ 通用账户