結果

問題 No.632 穴埋め門松列
ユーザー denderaKawazudenderaKawazu
提出日時 2018-02-13 23:11:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 1,022 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 41,320 KB
最終ジャッジ日時 2024-05-08 07:51:44
合計ジャッジ時間 3,364 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
41,320 KB
testcase_01 AC 114 ms
40,876 KB
testcase_02 AC 119 ms
40,976 KB
testcase_03 AC 127 ms
41,276 KB
testcase_04 AC 114 ms
41,056 KB
testcase_05 AC 108 ms
40,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String c1 = in.next();
            String c2 = in.next();
            String c3 = in.next();
            String ans;
            if (c2.equals("?")) {
                ans = "14";
            } else {
                if (c2.equals("3")) ans = "1";
                else ans = "4";
            }
            out.println(ans);
        }

    }
}

0