結果

問題 No.1721 [Cherry 3rd Tune N] 麗しきNumber
ユーザー yuzu32ut
提出日時 2022-03-01 18:25:49
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 13,788 ms
コンパイル使用メモリ 378,124 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 00:59:48
合計ジャッジ時間 13,194 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

fn read() -> String {
    let mut buf = String::new();
    std::io::stdin().read_line(&mut buf).unwrap();
    buf.trim().to_owned()
}

fn solve(s: String) -> &'static str {
    fn contain_with<const N: u8>(s: &str) -> bool {
        s.contains(&N.to_string())
    }

    if contain_with::<4>(&s) && contain_with::<6>(&s) {
        "Beautiful"
    } else {
        "..."
    }
}

fn main() {
    println!("{}", solve(read()));
}
0