結果

問題 No.547 未知の言語
ユーザー cra77756176
提出日時 2022-12-07 20:06:48
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 468 bytes
コンパイル時間 14,138 ms
コンパイル使用メモリ 377,596 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 00:36:46
合計ジャッジ時間 15,425 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut input = String::new();
    std::io::Read::read_to_string(&mut std::io::stdin(), &mut input).ok();
    let input: Vec<String> = input
        .split_whitespace()
        .skip(1)
        .map(|n| n.parse().unwrap())
        .collect();

    let n = input.len() / 2;
    let i_diff = (0..n).find(|&i| input[i] != input[n + i]).unwrap();

    println!("{}", i_diff + 1);
    println!("{}", input[i_diff]);
    println!("{}", input[n + i_diff]);
}
0