AtCoder Beginner Contest 008

Submission #4230614

Source codeソースコード

import java.io.*;
import java.util.*;
public class Main {
	
	public static void main(String[] args) {
	
		MyScanner sc = new MyScanner();
		//String s=sc.next();
		
		
		int a=sc.nextInt();
		int b=sc.nextInt();
		//int c=sc.nextInt();
		
		//int l=s.length();

		
		System.out.println(b-a+1);
	
		
	}	
	
	
	
//----------------------------------------------------------
	static int l_min(int[] a) {
		Arrays.sort(a);
		return a[0];
	}
	static int l_max(int[] a) {
		int l=a.length;
		Arrays.sort(a);
		return a[l-1];
	}
	public static PrintWriter out;

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	

}



Submission

Task問題 A - アルバム
User nameユーザ名 gray
Created time投稿日時
Language言語 Java8 (OpenJDK 1.8.0)
Status状態 AC
Score得点 100
Source lengthソースコード長 1376 Byte
File nameファイル名
Exec time実行時間 71 ms
Memory usageメモリ使用量 22612 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt
All 100 / 100 sample_01.txt,sample_02.txt,case_01.txt,case_02.txt,case_03.txt,case_04.txt,case_05.txt,case_06.txt,case_07.txt,case_08.txt,case_09.txt,case_10.txt,case_11.txt,case_12.txt,case_13.txt,case_14.txt,case_15.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
case_01.txt AC 71 ms 20692 KB
case_02.txt AC 70 ms 20692 KB
case_03.txt AC 68 ms 18004 KB
case_04.txt AC 69 ms 19156 KB
case_05.txt AC 70 ms 18260 KB
case_06.txt AC 70 ms 18644 KB
case_07.txt AC 71 ms 22484 KB
case_08.txt AC 69 ms 19412 KB
case_09.txt AC 70 ms 20948 KB
case_10.txt AC 69 ms 19028 KB
case_11.txt AC 69 ms 18516 KB
case_12.txt AC 71 ms 21076 KB
case_13.txt AC 69 ms 22612 KB
case_14.txt AC 71 ms 18644 KB
case_15.txt AC 69 ms 19284 KB
sample_01.txt AC 69 ms 19156 KB
sample_02.txt AC 71 ms 21072 KB