結果

問題 No.687 E869120 and Constructing Array 1
ユーザー seinyan
提出日時 2021-11-15 20:16:12
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 468 bytes
コンパイル時間 12,430 ms
コンパイル使用メモリ 390,380 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 03:36:49
合計ジャッジ時間 12,167 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let n: i32 = input_line()[0];

    for a in 1..=10 {
        for b in 1..=10 {
            if a + b == n {
                println!("{} {}", a, b);
                return;
            }
        }
    }
}

#[allow(unused)]
fn input_line<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
0