結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー マサマサ
提出日時 2021-12-28 14:33:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 657 bytes
コンパイル時間 1,802 ms
コンパイル使用メモリ 74,140 KB
実行使用メモリ 54,388 KB
最終ジャッジ日時 2024-04-10 05:29:56
合計ジャッジ時間 5,786 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
52,924 KB
testcase_01 AC 103 ms
52,900 KB
testcase_02 AC 104 ms
52,940 KB
testcase_03 AC 120 ms
53,880 KB
testcase_04 AC 120 ms
54,212 KB
testcase_05 AC 102 ms
52,944 KB
testcase_06 AC 115 ms
54,220 KB
testcase_07 AC 99 ms
52,704 KB
testcase_08 AC 118 ms
54,044 KB
testcase_09 AC 101 ms
54,276 KB
testcase_10 WA -
testcase_11 AC 118 ms
54,072 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 102 ms
52,780 KB
testcase_16 AC 105 ms
52,772 KB
testcase_17 WA -
testcase_18 AC 112 ms
53,604 KB
testcase_19 AC 119 ms
54,016 KB
testcase_20 WA -
testcase_21 AC 104 ms
53,012 KB
testcase_22 AC 107 ms
53,492 KB
testcase_23 AC 118 ms
54,052 KB
testcase_24 WA -
testcase_25 AC 110 ms
53,004 KB
testcase_26 AC 118 ms
54,164 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("6")) {
                flg4 += 1;
            }
            if(tmp.equals("6")) {
                flg6 += 1;
            }
        }
        
        if(flg4 > 0 && flg6 > 0) {
            System.out.println("Beautiful");
        }else {
            System.out.println("...");
        }
        
        
    }
}
0