Submission #37110428
Source Code Expand
Copy
use std::io;fn main() {let mut input = String::new();io::stdin().read_line(&mut input).unwrap();input.pop();let v_count = input.chars().filter(|c| *c == 'v').count();let w_count = input.len() - v_count;println!("{}", v_count + w_count * 2);}
use std::io; fn main() { let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); input.pop(); let v_count = input.chars().filter(|c| *c == 'v').count(); let w_count = input.len() - v_count; println!("{}", v_count + w_count * 2); }
Submission Info
Submission Time | |
---|---|
Task | A - wwwvvvvvv |
User | Reputeless |
Language | Rust (1.42.0) |
Score | 100 |
Code Size | 287 Byte |
Status | AC |
Exec Time | 8 ms |
Memory | 2100 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 02_max_00.txt, 02_max_01.txt, 02_max_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 8 ms | 2040 KB |
00_sample_01.txt | AC | 1 ms | 2044 KB |
00_sample_02.txt | AC | 2 ms | 2100 KB |
01_random_00.txt | AC | 3 ms | 1976 KB |
01_random_01.txt | AC | 1 ms | 1932 KB |
01_random_02.txt | AC | 1 ms | 1956 KB |
01_random_03.txt | AC | 2 ms | 1928 KB |
02_max_00.txt | AC | 1 ms | 2092 KB |
02_max_01.txt | AC | 1 ms | 1992 KB |
02_max_02.txt | AC | 1 ms | 1940 KB |