Submission #2531602
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; int chair[][] = new int[n][2]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { chair[i][j] = sc.nextInt(); } count += chair[i][1] - chair[i][0] + 1; } System.out.println(count); } }
Submission Info
Submission Time | |
---|---|
Task | B - Theater |
User | yoshitaka |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 414 Byte |
Status | AC |
Exec Time | 144 ms |
Memory | 27748 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 141 ms | 24668 KB |
02.txt | AC | 139 ms | 20944 KB |
03.txt | AC | 142 ms | 22100 KB |
04.txt | AC | 139 ms | 27748 KB |
05.txt | AC | 144 ms | 25456 KB |
06.txt | AC | 92 ms | 20560 KB |
sample_01.txt | AC | 93 ms | 21844 KB |
sample_02.txt | AC | 92 ms | 23764 KB |