Editorial for Diện tích hình vuông
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Gọi độ dài đường chéo là ~d~, độ dài cạnh là ~a~.
Khi đó ta có ~ d^2 = a^2 + a^2 ~ => ~d^2 = 2a^2~ (theo định lý Pytago)
Dễ thấy diện tích hình vuông là ~a^2 = d^2/2~.
Comments
Lí do python sai test 4
Tôi dùng python 3. Test 4 bị lỗi miết, không hiểu sao, team coi lại xem!