Coin

= ACM-ICPC 2009 ASIA Seoul Practice Problem A - Coin = In Korea, there are four kinds of coins - a 10-won coin, a 50-won coin, 100-won coin and a 500-won coin.

Given K 10-won coins, L 50-won coins, M 100-won coins and N 500-won coins, you are to write a program that calculate the total amount.

Input
The input consists of T test cases. The number of test cases T is given in the first line of the input file. Each test case will consist of four integers K, L, M and N (0 <= K, L, M, N <= 100). The integers given in a line are separated by a space.

Output
Print exactly one line for each test case. For each test case of K, L, M and N you should output the total amount.

The following shows sample input and output for three test cases.

Sample Input
3 1 1 1 1 0 1 2 3 1 2 10 20

Output for the Sample Input
660 1750 11110

Source Code C code format="c"
 * 1) include 

int main {       int T;        scanf("%d", &T);

for(int i = 0; i < T; i++) {               int K, L, M, N;                scanf("%d %d %d %d", &K, &L, &M, &N);

int total = 0; total = K * 10 + L * 50 + M * 100 + N * 500;

printf("%d\n", total); }

return 0; } code

Comment 문제가 워낙 쉽다보니 아무 생각없이 그냥 코딩했다.