結果

問題 No.239 にゃんぱすー
ユーザー m0ntBL4Ncm0ntBL4Nc
提出日時 2019-10-20 09:18:23
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 828 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 144,440 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-15 14:33:57
合計ジャッジ時間 1,951 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
4,380 KB
testcase_10 WA -
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 WA -
testcase_21 AC 1 ms
4,380 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 1 ms
4,376 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 1 ms
4,376 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 WA -
testcase_35 AC 1 ms
4,380 KB
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

fn getline() -> String {
    let mut __ret = String::new();
    std::io::stdin().read_line(&mut __ret).ok();
    return __ret;
}

fn main() {
    let n: usize = getline().trim().parse().unwrap();

    let mut nyanpass_count_vector = [0; 100];

    for _ in 0..n {
        let line = getline();
        let greetings: Vec<_> = line.trim().split(' ').collect();

        for j in 0..n {
            let greeting = greetings[j];

            if greeting == "nyanpass" {
                nyanpass_count_vector[j] += 1;
            }
        }
    }

    let mut nyanpass_resident_number: i32 = -1;

    for i in 0..nyanpass_count_vector.len() {
        if nyanpass_count_vector[i] == n as i32 - 1 {
            nyanpass_resident_number = i as i32;
            break;
        }
    }

    println!("{}", nyanpass_resident_number+1);
}
0