結果

問題 No.1543 [Cherry 2nd Tune A] これがプログラミングなのね
ユーザー sysnote8main
提出日時 2023-05-07 18:33:41
言語 Java
(openjdk 23)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 728 bytes
コンパイル時間 2,947 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 54,284 KB
最終ジャッジ日時 2024-11-24 18:05:07
合計ジャッジ時間 8,278 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

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