結果

問題 No.2415 偶数判定!Nafmoくん
ユーザー hiromi_ayasehiromi_ayase
提出日時 2023-08-12 14:21:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 2,031 bytes
コンパイル時間 2,474 ms
コンパイル使用メモリ 77,832 KB
実行使用メモリ 37,652 KB
最終ジャッジ日時 2024-04-30 05:49:37
合計ジャッジ時間 5,200 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
37,644 KB
testcase_01 AC 48 ms
37,600 KB
testcase_02 AC 48 ms
37,644 KB
testcase_03 AC 48 ms
37,420 KB
testcase_04 AC 47 ms
37,596 KB
testcase_05 AC 47 ms
37,368 KB
testcase_06 AC 50 ms
37,408 KB
testcase_07 AC 52 ms
37,632 KB
testcase_08 AC 52 ms
37,116 KB
testcase_09 AC 52 ms
37,264 KB
testcase_10 AC 52 ms
37,428 KB
testcase_11 AC 53 ms
37,456 KB
testcase_12 AC 51 ms
37,652 KB
testcase_13 AC 49 ms
37,472 KB
testcase_14 AC 51 ms
37,500 KB
testcase_15 AC 50 ms
37,504 KB
testcase_16 AC 53 ms
37,468 KB
testcase_17 AC 51 ms
37,544 KB
testcase_18 AC 51 ms
37,580 KB
testcase_19 AC 52 ms
37,528 KB
testcase_20 AC 60 ms
37,524 KB
testcase_21 AC 51 ms
37,384 KB
testcase_22 AC 51 ms
37,180 KB
testcase_23 AC 56 ms
37,448 KB
testcase_24 AC 52 ms
37,116 KB
testcase_25 AC 52 ms
37,428 KB
testcase_26 AC 49 ms
37,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

@SuppressWarnings("unused")
public class Main {

  private static void solve() {
    char[] a = ns();
    char[] b = ns();

    if (a[a.length - 1] == b[b.length - 1] && a[a.length - 1] == '1') {
      System.out.println("Odd");
    } else {
      System.out.println("Even");
    }
  }

  public static void main(String[] args) {
    new Thread(null, new Runnable() {
      @Override
      public void run() {
        solve();
        out.flush();
      }
    }, "", 64000000).start();
  }

  private static PrintWriter out = new PrintWriter(System.out);
  private static StringTokenizer tokenizer = null;
  private static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 32768);

  public static String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  private static double nd() {
    return Double.parseDouble(next());
  }

  private static long nl() {
    return Long.parseLong(next());
  }

  private static int[] na(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++)
      a[i] = ni();
    return a;
  }

  private static char[] ns() {
    return next().toCharArray();
  }

  private static long[] nal(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++)
      a[i] = nl();
    return a;
  }

  private static int[][] ntable(int n, int m) {
    int[][] table = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[i][j] = ni();
      }
    }
    return table;
  }

  private static int[][] nlist(int n, int m) {
    int[][] table = new int[m][n];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[j][i] = ni();
      }
    }
    return table;
  }

  private static int ni() {
    return Integer.parseInt(next());
  }
}
0