PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#CCBCHBA0000065. Bảng nhiệt độ có tiêu đề (Fahrenheit to Celsius Table with Header)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Bảng nhiệt độ có tiêu đề (Fahrenheit to Celsius Table with Header)
Fahrenheit to Celsius Table with Header
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Print a Fahrenheit-to-Celsius conversion table. The first line must be exactly F C. For F=0,20,...,300, print F C, separated by one space, with C=(F-32)*5/9 formatted to exactly one decimal place. Do not print prompts or units.
Input
There is no input.
Output
Exactly 17 lines: the header F C, followed by 16 rows F C. Every line ends with a newline.
Subtasks
- Subtask 1 (20%): In đúng dòng tiêu đề và bảng cố định như mô tả.
- Subtask 2 (30%): In đúng dòng tiêu đề và bảng cố định như mô tả.
- Subtask 3 (50%): In đúng toàn bộ 17 dòng theo đặc tả.
Examples
Example 1
Input:
Output:
F C
0 -17.8
20 -6.7
40 4.4
60 15.6
80 26.7
100 37.8
120 48.9
140 60.0
160 71.1
180 82.2
200 93.3
220 104.4
240 115.6
260 126.7
280 137.8
300 148.9
Explanation:
The table starts at F=0 (C=-17.8) and ends at F=300 (C=148.9); all rows are shown.