提出 #948609


ソースコード 拡げる

import java.util.*;


public class Main {
	public static void main(String[] args) {
		int a; //(上辺)
		int b; //(底辺)
		int h; //(高さ)
		int s; //(面積)
		
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		h = sc.nextInt();
		
		s = ( a + b ) * h / 2;
		
		System.out.println( s );
	}
}
		

提出情報

提出日時
問題 A - 台形
ユーザ nobutan1017
言語 Java8 (OpenJDK 1.8.0)
得点 100
コード長 367 Byte
結果 AC
実行時間 130 ms
メモリ 9796 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 5
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt
ケース名 結果 実行時間 メモリ
01.txt AC 126 ms 9684 KiB
02.txt AC 130 ms 9680 KiB
03.txt AC 126 ms 9796 KiB
04.txt AC 128 ms 9680 KiB
05.txt AC 127 ms 9684 KiB
sample_01.txt AC 126 ms 9668 KiB
sample_02.txt AC 129 ms 9552 KiB