結果

問題 No.2738 CPC To F
ユーザー t33ft33f
提出日時 2024-04-21 10:57:37
言語 Rust
(1.77.0)
結果
RE  
実行時間 -
コード長 440 bytes
コンパイル時間 7,914 ms
コンパイル使用メモリ 151,268 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-21 10:57:46
合計ジャッジ時間 2,296 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 RE -
testcase_03 AC 3 ms
6,940 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 1 ms
6,940 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#![allow(non_snake_case)]
use proconio::{input, marker::Bytes};

fn main() {
    input! { n: usize, s: Bytes }
    let mut ans = 0;
    let mut i = 0;
    while i < n {
        if s[i..i+5] == [67, 80, 67, 84, 70] {
            ans += 1;
            i += 5;
        } else if s[i..i+7] == [67, 80, 67, 84, 67, 80, 67] {
            ans += 1;
            i += 7;
        } else {
            i += 1;
        }
    }
    println!("{ans}");
}
0