啦啦啦,至李昊霖

2018-12-06 14:39:14


# include <queue>
# include <ctime>
# include <vector>
# include <cstdio>
# include <cstring>
# include <algorithm>
# define F(i, a, b) for (int i = a; i < b; i++)
using namespace std;
int main(){
    int n;
    scanf("%d", &n);
    F(j, 0, n){
        int a, b, c;
        scanf("%d%d%d", &a, &b, &c);
        t t = b;
        if (c == 2){
            while (b){
                printf("%lld ", (long long) a * (b % 10));
                b /= 10;
            }
        }
        printf("%lld\n", (long long) a * t);
    }
    return 0;
}