結果

問題 No.687 E869120 and Constructing Array 1
コンテスト
ユーザー elphe
提出日時 2026-02-08 16:09:00
言語 Rust
(1.93.0 + proconio + num + itertools)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 461 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 983 ms
コンパイル使用メモリ 198,332 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-02-08 16:09:03
合計ジャッジ時間 2,959 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fn main() {
    let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
    let mut stdin = stdin.split_ascii_whitespace();

    let n: u8 = stdin.next().unwrap().parse().unwrap();

    use std::io::Write;
    std::io::stdout()
        .write_all(output(solve(n)).as_bytes())
        .unwrap();
}

fn solve(n: u8) -> (u8, u8) {
    (n >> 1, (n + 1) >> 1)
}

fn output(ans: (u8, u8)) -> String {
    ans.0.to_string() + " " + &ans.1.to_string() + "\n"
}
0