結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー マサマサ
提出日時 2021-12-28 14:39:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 74,804 KB
実行使用メモリ 54,312 KB
最終ジャッジ日時 2024-04-10 05:35:29
合計ジャッジ時間 6,571 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
54,044 KB
testcase_01 AC 122 ms
53,840 KB
testcase_02 AC 123 ms
53,904 KB
testcase_03 AC 123 ms
54,224 KB
testcase_04 AC 122 ms
54,192 KB
testcase_05 AC 124 ms
53,888 KB
testcase_06 AC 123 ms
53,912 KB
testcase_07 AC 123 ms
54,312 KB
testcase_08 AC 127 ms
54,272 KB
testcase_09 AC 127 ms
54,008 KB
testcase_10 AC 107 ms
53,012 KB
testcase_11 AC 108 ms
52,872 KB
testcase_12 AC 121 ms
54,056 KB
testcase_13 AC 124 ms
53,796 KB
testcase_14 AC 124 ms
53,984 KB
testcase_15 AC 123 ms
54,108 KB
testcase_16 AC 125 ms
53,900 KB
testcase_17 AC 109 ms
53,052 KB
testcase_18 AC 121 ms
53,856 KB
testcase_19 AC 122 ms
53,948 KB
testcase_20 AC 111 ms
52,744 KB
testcase_21 AC 124 ms
54,312 KB
testcase_22 AC 123 ms
54,260 KB
testcase_23 AC 123 ms
53,908 KB
testcase_24 AC 121 ms
54,060 KB
testcase_25 AC 112 ms
52,708 KB
testcase_26 AC 123 ms
53,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.nextLine();

        int flg4 = 0;
        int flg6 = 0;
        for(int i = 0; i < n.length(); i++) {
            String tmp = String.valueOf(n.charAt(i));
            if(tmp.equals("4")) {
                flg4 += 1;
            }
            if(tmp.equals("6")) {
                flg6 += 1;
            }
        }

        if(flg4 > 0 && flg6 > 0) {
            System.out.println("Beautiful");
        }else {
            System.out.println("...");
        }


    }
}
0