Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**********************************************************************************/
- /* Problem: d489 "伏林的三角地" from 板橋高中 */
- /* Language: JAVA (548 Bytes) */
- /* Result: AC(97ms, 2.4MB) judge by this@ZeroJudge */
- /* Author: ssc24 at 2011-09-26 12:26:28 */
- /**********************************************************************************/
- package javaapplication42;
- import java.util.*;
- import java.math.*;
- public class JavaApplication42 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- while (sc.hasNext()){
- int a =sc.nextInt();
- int b =sc.nextInt();
- int c =sc.nextInt();
- double s =((a+b+c)*0.5);
- //int price =(s*(s-a)*(s-b)*(s-c)); // 求面積需要開根號
- System.out.printf("%.0f%n",(s*(s-a)*(s-b)*(s-c)));
- }//whlle*/
- }//main
- }//class
Add Comment
Please, Sign In to add comment