結果
問題 | No.712 赤旗 |
ユーザー | seinyan |
提出日時 | 2021-10-31 20:07:37 |
言語 | Rust (1.77.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 611 bytes |
コンパイル時間 | 9,627 ms |
コンパイル使用メモリ | 145,728 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-17 16:45:06 |
合計ジャッジ時間 | 2,309 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 0 ms
5,376 KB |
ソースコード
use std::io; fn input_num() -> Vec<u64> { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); let mut v = Vec::new(); for i in s.split_whitespace() { v.push(i.parse().unwrap()); } v } fn input_str() -> String { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); s } fn main() { let v = input_num(); let mut count = 0; let mut s; for _i in 0..v[0] { s = input_str(); for c in s.chars() { if c == 'W' { count += 1; } } } println!("{}", count); }