結果

問題 No.293 4>7の世界
ユーザー tom_tom_tomtom_tom_tom
提出日時 2015-11-10 17:12:28
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 950 bytes
コンパイル時間 3,317 ms
コンパイル使用メモリ 72,924 KB
実行使用メモリ 57,636 KB
最終ジャッジ日時 2023-10-11 15:32:40
合計ジャッジ時間 7,504 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 123 ms
55,716 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

import java.util.Scanner;

/**
 * No.293 4>7の世界
 * star 2
 * http://yukicoder.me/problems/728
 */
public class YukiCoder293 {

    public static void main(String[] args) {
        run();
    }

    public static void run() {
        Scanner sc = new Scanner("1237564890 1234567890");
//        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] org = s.split(" ");
        String l = org[0];
        String r = org[1];
        s = s.replace('4', 'A');
        s = s.replace('7', '4');
        s = s.replace('A', '7');
        String[] ss = s.split(" ");
        long a = Long.parseLong(ss[0]);
        long b = Long.parseLong(ss[1]);
        boolean left = false;
        if (a > b) {
            left = true;
        }

        System.out.println(left ? l : r);
//        System.out.println(Math.max(a, b));
    }
/*
4 7
4

5 7
5

40 170
170

1237564890 1234567890
1234567890
 */

}
0