結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー Subaru314Subaru314
提出日時 2022-01-05 01:25:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 522 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 74,640 KB
実行使用メモリ 41,716 KB
最終ジャッジ日時 2024-04-23 04:58:01
合計ジャッジ時間 6,597 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,668 KB
testcase_01 AC 126 ms
41,452 KB
testcase_02 AC 125 ms
41,176 KB
testcase_03 AC 124 ms
41,496 KB
testcase_04 AC 114 ms
41,220 KB
testcase_05 AC 116 ms
41,128 KB
testcase_06 AC 125 ms
41,472 KB
testcase_07 AC 112 ms
40,056 KB
testcase_08 AC 114 ms
41,716 KB
testcase_09 AC 126 ms
41,276 KB
testcase_10 AC 124 ms
40,968 KB
testcase_11 AC 124 ms
41,232 KB
testcase_12 AC 125 ms
41,492 KB
testcase_13 AC 123 ms
41,128 KB
testcase_14 AC 124 ms
41,656 KB
testcase_15 AC 125 ms
41,648 KB
testcase_16 AC 126 ms
41,148 KB
testcase_17 AC 124 ms
41,204 KB
testcase_18 AC 122 ms
41,696 KB
testcase_19 AC 127 ms
40,992 KB
testcase_20 AC 124 ms
41,268 KB
testcase_21 AC 124 ms
41,396 KB
testcase_22 AC 123 ms
41,164 KB
testcase_23 AC 134 ms
40,976 KB
testcase_24 AC 114 ms
41,000 KB
testcase_25 AC 125 ms
41,596 KB
testcase_26 AC 125 ms
41,472 KB
権限があれば一括ダウンロードができます

ソースコード

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