#CCBCHBAHAI0000054. Hai danh sách - tích tương ứng và căn tổng (Two Lists - Pairwise Products and Square Root of the Sum)
Hai danh sách - tích tương ứng và căn tổng (Two Lists - Pairwise Products and Square Root of the Sum)
Two Lists - Pairwise Products and Square Root of the Sum (Hai danh sách - tích tương ứng và căn tổng)
Source: Problem Solving and Program Design in C
Version: Phuoc Hung OJ Extended
Problem
Given two non-negative integer sequences
$$x_0,x_1,\ldots,x_{n-1}\quad\text{and}\quad y_0,y_1,\ldots,y_{n-1},$$define
and
For every index, print , then print with exactly digits after the decimal point.
Input
The first line contains . The second line contains . The third line contains .
Output
For each , print x_i y_i z_i on its own line. On the last line, print with exactly 6 digits after the decimal point.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
4
1 2 3 4
5 6 7 8
Output
1 5 5
2 6 12
3 7 21
4 8 32
8.366600
Explanation
The sample follows the definitions and rules above.