結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー Subaru314
提出日時 2022-01-05 01:25:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 522 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 77,440 KB
実行使用メモリ 41,420 KB
最終ジャッジ日時 2024-10-15 04:36:25
合計ジャッジ時間 5,979 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String num = sc.next();
    
    int len = num.length();
    boolean is4 = false;
    boolean is6 = false;
    
    for(int i=0; i<len; i++){
      if(num.charAt(i)=='4'){
        is4 = true;
      }
      if(num.charAt(i)=='6'){
        is6 = true;
      }
    }
    
    if(is4 && is6){
      System.out.println("Beautiful");
    }else{
      System.out.println("...");
    }
  
  }

}
0