結果

問題 No.841 8/32
ユーザー taktak
提出日時 2019-07-02 13:09:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 3,057 bytes
コンパイル時間 3,633 ms
コンパイル使用メモリ 74,392 KB
実行使用メモリ 49,540 KB
最終ジャッジ日時 2023-09-28 11:31:23
合計ジャッジ時間 6,339 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
49,540 KB
testcase_01 AC 47 ms
49,508 KB
testcase_02 AC 46 ms
49,140 KB
testcase_03 AC 44 ms
49,268 KB
testcase_04 AC 45 ms
49,424 KB
testcase_05 AC 46 ms
49,260 KB
testcase_06 AC 44 ms
49,368 KB
testcase_07 AC 46 ms
49,356 KB
testcase_08 AC 45 ms
49,336 KB
testcase_09 AC 47 ms
49,312 KB
testcase_10 AC 45 ms
49,420 KB
testcase_11 AC 46 ms
49,340 KB
testcase_12 AC 46 ms
49,144 KB
testcase_13 AC 46 ms
49,300 KB
testcase_14 AC 46 ms
49,264 KB
testcase_15 AC 45 ms
49,168 KB
testcase_16 AC 47 ms
49,252 KB
testcase_17 AC 45 ms
47,344 KB
testcase_18 AC 46 ms
49,136 KB
testcase_19 AC 46 ms
49,140 KB
testcase_20 AC 46 ms
49,456 KB
testcase_21 AC 47 ms
49,416 KB
testcase_22 AC 46 ms
49,520 KB
testcase_23 AC 46 ms
49,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.*;
import java.io.*;

public class Solver {

    public static void main(String[] args) {
        new Solver().stream();
    }

    final IO io = new IO();
    final PrintWriter out = new PrintWriter(System.out);
    
    void stream() {
        solve();
        out.flush();
    }

    void solve() {
        String s_1 = io.String();
        String s_2 = io.String();
        if ((s_1.equals("Sat") || s_1.equals("Sun")) && (!s_2.equals("Sat") && !s_2.equals("Sun"))) {
            System.out.println("8/32");
        } else if ((s_1.equals("Sat") || s_1.equals("Sun")) && (s_2.equals("Sat") || s_2.equals("Sun"))) {
            System.out.println("8/33");
        } else {
            System.out.println("8/31");
        }
    }

}

class IO {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1 << 12];
    private int ptr = 0, buffLen = 0;

    private boolean hasNextByte() {
        if (ptr < buffLen) return true;
        ptr = 0;
        try {
            buffLen = in.read(buffer);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return buffLen > 0;
    }

    private int readByte() {
        return hasNextByte() ? buffer[ptr++] : -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    } //ASCII

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    private boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    private String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public String String() {
        return next();
    }

    public char Char() {
        return next().charAt(0);
    }

    public int Int() {
        return Integer.parseInt(next());
    }

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

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

    public String[] StringArr(final int n) {
        final String[] arr = new String[n];
        for (int i = 0; i < n; ++i) arr[i] = String();
        return arr;
    }

    public char[] CharArr(final int n) {
        final char[] arr = new char[n];
        for (int i = 0; i < n; ++i) arr[i] = Char();
        return arr;
    }

    public int[] IntArr(final int n) {
        final int[] arr = new int[n];
        for (int i = 0; i < n; ++i) arr[i] = Int();
        return arr;
    }

    public long[] LongArr(final int n) {
        final long[] arr = new long[n];
        for (int i = 0; i < n; ++i) arr[i] = Long();
        return arr;
    }

    public double[] DoubleArr(final int n) {
        final double[] arr = new double[n];
        for (int i = 0; i < n; ++i) arr[i] = Double();
        return arr;
    }
}
0