結果

問題 No.495 (^^*) Easy
ユーザー packet0packet0
提出日時 2017-03-26 22:07:32
言語 Rust
(1.77.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 3,722 ms
コンパイル使用メモリ 122,844 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 11:08:12
合計ジャッジ時間 1,233 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 4 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io;
use std::io::Read;

const L: u8 = '^' as u8;
const R: u8 = '*' as u8;

fn main() {
    let (mut l, mut r) = (0, 0);
    for (i, b) in io::stdin().bytes().enumerate() {
        if i % 5 == 1 {
            match b {
                Ok(L) => l += 1,
                Ok(R) => r += 1,
                _ => (),
            }

        }
    }
    println!("{} {}", l, r);
}
0