結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー tentententen
提出日時 2021-11-01 14:58:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 1,154 bytes
コンパイル時間 1,898 ms
コンパイル使用メモリ 74,588 KB
実行使用メモリ 50,392 KB
最終ジャッジ日時 2024-04-18 10:56:37
合計ジャッジ時間 4,089 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
50,020 KB
testcase_01 AC 51 ms
50,380 KB
testcase_02 AC 53 ms
50,216 KB
testcase_03 AC 48 ms
50,152 KB
testcase_04 AC 49 ms
50,048 KB
testcase_05 AC 51 ms
50,312 KB
testcase_06 AC 49 ms
50,196 KB
testcase_07 AC 47 ms
50,116 KB
testcase_08 AC 48 ms
50,024 KB
testcase_09 AC 52 ms
50,336 KB
testcase_10 AC 48 ms
50,152 KB
testcase_11 AC 47 ms
50,108 KB
testcase_12 AC 46 ms
50,280 KB
testcase_13 AC 48 ms
50,044 KB
testcase_14 AC 47 ms
50,160 KB
testcase_15 AC 51 ms
50,088 KB
testcase_16 AC 49 ms
50,152 KB
testcase_17 AC 52 ms
50,392 KB
testcase_18 AC 48 ms
50,116 KB
testcase_19 AC 49 ms
50,200 KB
testcase_20 AC 51 ms
50,252 KB
testcase_21 AC 50 ms
50,028 KB
testcase_22 AC 48 ms
50,044 KB
testcase_23 AC 47 ms
50,220 KB
testcase_24 AC 45 ms
50,260 KB
testcase_25 AC 46 ms
50,264 KB
testcase_26 AC 53 ms
50,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        boolean four = false;
        boolean six = false;
        for (char c : sc.next().toCharArray()) {
            four |= (c == '4');
            six |= (c == '6');
        }
        if (four && six) {
            System.out.println("Beautiful");
        } else {
            System.out.println("...");
        }
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public String nextLine() throws Exception {
        return br.readLine();
    }
    
    public String next() throws Exception {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}
0