結果

問題 No.1543 [Cherry 2nd Tune A] これがプログラミングなのね
ユーザー sysnote8mainsysnote8main
提出日時 2023-05-07 18:33:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 728 bytes
コンパイル時間 4,761 ms
コンパイル使用メモリ 72,348 KB
実行使用メモリ 56,616 KB
最終ジャッジ日時 2023-08-16 06:48:43
合計ジャッジ時間 10,751 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,968 KB
testcase_01 AC 121 ms
55,756 KB
testcase_02 AC 123 ms
56,268 KB
testcase_03 AC 122 ms
56,176 KB
testcase_04 AC 121 ms
56,020 KB
testcase_05 AC 123 ms
55,760 KB
testcase_06 AC 122 ms
55,408 KB
testcase_07 AC 120 ms
56,168 KB
testcase_08 AC 121 ms
56,096 KB
testcase_09 AC 119 ms
56,616 KB
testcase_10 AC 123 ms
56,072 KB
testcase_11 AC 121 ms
55,976 KB
testcase_12 AC 122 ms
56,432 KB
testcase_13 AC 124 ms
55,864 KB
testcase_14 AC 125 ms
55,860 KB
testcase_15 AC 121 ms
56,220 KB
testcase_16 AC 120 ms
55,832 KB
testcase_17 AC 120 ms
55,736 KB
testcase_18 AC 123 ms
55,672 KB
testcase_19 AC 123 ms
55,740 KB
testcase_20 AC 125 ms
55,828 KB
testcase_21 AC 124 ms
56,024 KB
testcase_22 AC 122 ms
56,148 KB
testcase_23 AC 121 ms
56,120 KB
testcase_24 AC 122 ms
55,616 KB
testcase_25 AC 124 ms
56,208 KB
testcase_26 AC 124 ms
56,092 KB
testcase_27 AC 120 ms
56,116 KB
testcase_28 AC 120 ms
55,756 KB
testcase_29 AC 123 ms
55,568 KB
testcase_30 AC 119 ms
55,924 KB
testcase_31 AC 119 ms
56,004 KB
testcase_32 AC 122 ms
55,732 KB
testcase_33 AC 126 ms
55,772 KB
testcase_34 AC 124 ms
56,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class StringComparator {
    public static void log(Object obj) {
        System.out.println(obj.toString());
    }
    public static boolean isCheck(int a, int b, String type) {
        if(type.equals("=")) {
            return a==b;
        }
        if(type.equals("<")) {
            return a<b;
        }
        if(type.equals(">")) {
            return a>b;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int t = sc.nextInt();
        String c = sc.next();
        if(isCheck(s,t,c)) {
            log("YES");
        } else {
            log("NO");
        }
    }
}
0