Submission #2527820


Source Code Expand

import java.util.*;


public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int result = 0 ;

    for(int i = 0 ; i <  N ; i ++ ){
      int l = sc.nextInt();
      int r = sc.nextInt();
      result = result + ( r - l + 1 );
    }
    System.out.println(result);
  }
}

Submission Info

Submission Time
Task B - Theater
User shosinsha
Language Java8 (OpenJDK 1.8.0)
Score 200
Code Size 367 Byte
Status AC
Exec Time 142 ms
Memory 25300 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 8
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 139 ms 22864 KB
02.txt AC 140 ms 22608 KB
03.txt AC 138 ms 25300 KB
04.txt AC 130 ms 22356 KB
05.txt AC 142 ms 24144 KB
06.txt AC 103 ms 21332 KB
sample_01.txt AC 94 ms 21076 KB
sample_02.txt AC 94 ms 19284 KB