#P90. 計算矩形面積

計算矩形面積

題目描述

編寫一個Python程序,接受用戶輸入矩形邊長,並計算輸出矩形面積。

輸入格式

一行輸入兩個正整數 a, b 作為矩形的長和寬,數值之間以一個空白鍵分隔

a, b < 100,000

輸出格式

矩形面積

Samples

["5 2","6 2"]
["10","12"]

提示

In the online judge system, the inputs come from "standard input". To read the data from standard input, we can use a function called "input()".

>>in_line = input()

[Note 1]However, the input() function will only give you one single line of input (from standard input). To split the data from a single line, we need a function called "split()" to help.

>> inputs = in_line.split()
>> print(inputs[0], inputs[1])

[Note 2]Even we have successfully split the data, the data is still in "string" format. To do our math calculation, we need to convert the string into integer by a function called "int()".

>>a = int(inputs[0])
>> b = int(inputs[1])

原始資料

  • Zero1 題號:a090
  • Hydro 題號:Z0090
  • Locale:zh_TW
  • Display:open