#include<stdio.h> #define MaxSize 290 int main() { int i, j,n, a, A[MaxSize]; for (i = 0; i < MaxSize; i++)A[i] = 0; scanf("%d %d", &a, &n); for (i = 0; i < n; i++) { A[MaxSize-1 - i] = (n - i) * a; } for (j = MaxSize-1; j > 0; j--) { if (A[j] >= 10) { A[j - 1] += A[j] / 10; A[j] %= 10; } } for (i = 0; A[i] == 0; i++); for (; i < MaxSize; i++)printf("%d", A[i]); return 0; }