AtCoder Beginner Contest 007

Submission #3728598

Source codeソースコード

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        String line = new Scanner().nextLine();
        if (line.equals("a")) {
            System.out.println(-1);
        } else {
            System.out.println("a");
        }
    }
}

Submission

Task問題 B - 辞書式順序
User nameユーザ名 k0kubun
Created time投稿日時
Language言語 Java8 (OpenJDK 1.8.0)
Status状態 CE
Score得点 -
Source lengthソースコード長 285 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.java:5: error: no suitable constructor found for Scanner(no arguments)
String line = new Scanner().nextLine();
^
constructor Scanner.Scanner(Readable,Pattern) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Readable) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(InputStream) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(InputStream,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
(actual and formal argument lists differ in length)
constructor S...

Test case