Area difference (simple)
Submit solution
Points:
10 (partial)
Time limit:
1.0s
Memory limit:
256M
Author:
Problem type
Allowed languages
Java 19, Java 8
題目說明
輸入一個長方形的兩個邊長,以及一個正方形的邊長,計算面積的差額 (長方形的面積大於等於正方形的面積多少, 可能為負)。
輸入資料限制:輸入數字都是整數,最小為1,最大為1000。
輸入
長方形的長 長方形的寬 正方形邊長
輸出
面積差
sample input1
10 20 15
sample output1
-25
sample input2
9 5 3
sample output2
36
Comments