結果

問題 No.1005 BOT対策
ユーザー omgitskuu
提出日時 2020-03-20 22:41:31
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 12,638 ms
コンパイル使用メモリ 382,736 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 07:17:40
合計ジャッジ時間 14,189 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
fn main(){ let s:String = read();
let x:String = read();
 
 if !s.contains(&x) {
    println!("0");
    }else if x.len() == 1 {
        println!("-1");
       }else{
      let count = s.matches(&x).count();  println!("{}",count);
    };

}
0