結果
問題 |
No.2738 CPC To F
|
ユーザー |
![]() |
提出日時 | 2024-04-21 10:57:37 |
言語 | Rust (1.83.0 + proconio) |
結果 |
RE
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 15,325 ms |
コンパイル使用メモリ | 378,008 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 09:42:41 |
合計ジャッジ時間 | 13,861 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 RE * 20 |
ソースコード
#![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}"); }