Problem:
Score : 100 points

Problem Statement

X and A are integers between 0 and 9 (inclusive).

If X is less than A, print 0; if X is not less than A, print 10.

Constraints

0 \leq X, A \leq 9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X A

Output

If X is less than A, print 0; if X is not less than A, print 10.

Sample Input 1

3 5

Sample Output 1

0

3 is less than 5, so we should print 0.

Sample Input 2

7 5

Sample Output 2

10

7 is not less than 5, so we should print 10.

Sample Input 3

6 6

Sample Output 3

10

6 is not less than 6, so we should print 10.

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

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

/**
 * AtCoder Beginner Contest 130<br>
 * B - Bounding<br>
 * https://atcoder.jp/contests/abc130/tasks/abc130_b<br>
 */
public class Main {

    public static void main(String[] args) {

        String[] input1;
        String[] input2;

        try (Scanner sc = new Scanner(System.in)) {
            input1 = sc.nextLine().split(" ");
            input2 = sc.nextLine().split(" ");

            int N = Integer.parseInt(input1[0]);
            int X = Integer.parseInt(input1[1]);

            List<Integer> list = new ArrayList<Integer>();
            for (String str : input2) {
                list.add(Integer.parseInt(str));
            }
            // 計算
            int result = calc(N, X, list);

            // 出力
            System.out.println(result);
        } 
    }

    private static int calc(int N, int X, List<Integer> list) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i <= N; i++) {
            ans = ans + list.get(i);
            if (X < ans) {
                break;
            }
            count++;
        }
        return count;
    }
}