結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,580 KB
testcase_01 AC 123 ms
55,960 KB
testcase_02 AC 124 ms
56,148 KB
testcase_03 WA -
testcase_04 AC 122 ms
55,736 KB
testcase_05 WA -
testcase_06 AC 122 ms
55,684 KB
testcase_07 AC 123 ms
55,808 KB
testcase_08 AC 123 ms
55,848 KB
testcase_09 WA -
testcase_10 AC 125 ms
55,644 KB
testcase_11 AC 123 ms
55,700 KB
testcase_12 AC 124 ms
55,404 KB
testcase_13 AC 125 ms
55,740 KB
testcase_14 AC 123 ms
55,596 KB
testcase_15 WA -
testcase_16 AC 123 ms
55,740 KB
testcase_17 AC 123 ms
55,792 KB
testcase_18 AC 123 ms
55,776 KB
testcase_19 AC 122 ms
53,664 KB
testcase_20 AC 123 ms
55,772 KB
testcase_21 AC 122 ms
55,344 KB
testcase_22 AC 123 ms
55,688 KB
testcase_23 AC 123 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

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(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