結果
問題 |
No.1721 [Cherry 3rd Tune N] 麗しきNumber
|
ユーザー |
|
提出日時 | 2021-12-28 14:33:39 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 657 bytes |
コンパイル時間 | 2,195 ms |
コンパイル使用メモリ | 74,420 KB |
実行使用メモリ | 41,668 KB |
最終ジャッジ日時 | 2024-10-02 07:03:45 |
合計ジャッジ時間 | 6,697 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 7 |
ソースコード
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("..."); } } }