Submission #1372352


Source Code Expand

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> num = new ArrayList<Integer>();
		ArrayList<String> param = new ArrayList<String>();

		while (sc.hasNext()) {
			if (sc.hasNextInt()) {
				num.add(sc.nextInt());
			} else {
				param.add(sc.nextLine());
			}
		}
		Method(num, param);
	}
	
	static void Method(ArrayList<Integer> num, ArrayList<String> param) {
		
		System.out.println((num.get(0) + num.get(1)) * num.get(2) / 2);
		
	}
}

Submission Info

Submission Time
Task A - Trapezoids
User unirita153
Language Java8 (OpenJDK 1.8.0)
Score 100
Code Size 607 Byte
Status AC
Exec Time 97 ms
Memory 21716 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 7
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
01.txt AC 96 ms 21716 KB
02.txt AC 95 ms 18772 KB
03.txt AC 96 ms 20692 KB
04.txt AC 95 ms 21716 KB
05.txt AC 97 ms 20688 KB
sample_01.txt AC 94 ms 20180 KB
sample_02.txt AC 97 ms 19028 KB