結果
| 問題 | 
                            No.9013 台形の面積
                             | 
                    
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-03-13 19:18:07 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 113 ms / 2,000 ms | 
| コード長 | 456 bytes | 
| コンパイル時間 | 1,729 ms | 
| コンパイル使用メモリ | 75,228 KB | 
| 実行使用メモリ | 54,304 KB | 
| 最終ジャッジ日時 | 2024-09-29 22:54:22 | 
| 合計ジャッジ時間 | 3,084 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 4 | 
ソースコード
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] strings = S.split(",");
        int u = Integer.parseInt(strings[0]);
        int b = Integer.parseInt(strings[1]);
        int h = Integer.parseInt(strings[2]);
        double a = (double) ((u + b) * h) / 2;
        System.out.printf("%s", String.format("%.2f", a));
    }
}