triangle vs square


Submit solution

Points: 50 (partial)
Time limit: 5.0s
Memory limit: 64M

Authors:
Problem type

題目說明

輸入三角形的底邊與高,以及正方形邊長

如果三角形面積比較大輸出triangle

如果正方形面積比較大輸出square

如果兩個面積相等的話輸出same

如果任一邊長為0或負數輸出error!,並且終止程式

輸入資料限制:輸入數字都是正整數

輸入

三角形底邊邊場 三角形的高 正方形邊場

輸出

面積較大之形狀

sample input1

5 4 3

sample output1

triangle

sample input2

3 6 3

sample output2

same

Comments

There are no comments at the moment.