A. [R8A]买糖果

    Type: Default 1000ms 512MiB

[R8A]买糖果

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

时空限制

1S/512M

题目描述

老师买了三种糖果,第一种糖果每颗 c1c_1 元,买了 n1n_1 颗;第二种糖果每颗 c2c_2 元,买了 n2n_2 颗;第三种糖果每颗 c3c_3 元,买了 n3n_3 颗。

请算出老师一共花了多少钱。

格式

输入格式

第一行包含三个整数 c1,c2,c3c_1,c_2,c_3,分别表示三种糖果的价格。

第二行包含三个整数 n1,n2,n3n_1,n_2,n_3,分别表示三种糖果的购买数量。

输出格式

输出一个整数表示老师一共花了多少钱。

样例

样例输入 #1

3 2 1
4 5 6

样例输出 #1

28

样例输入 #2

100 100 100
100 100 100

样例输出 #2

30000

数据规模

对于 100%100\% 的数据,1c1,c2,c31001\leq c_1,c_2,c_3\leq 1001n1,n2,n31001\leq n_1,n_2,n_3\leq 100

代码源挑战赛 Round 8

Not Attended
Status
Done
Rule
DMY
Problem
6
Start at
2025-4-18 20:00
End at
2025-4-18 21:30
Duration
1.5 hour(s)
Host
Partic.
515