MB
Size: a a a
MB
A
let mut v: Vec<String> = include_str!("input.txt")
.lines()
.map(|n| {let mut s = String::new(); s.push_str(n); s})
.collect();
A
MB
A
A
fn count(v: &Vec<String>) -> i32 {
*v.iter().map(|line| line.chars().filter(|c| *c == '#').count() as i32)
.sum::<i32>()
}
A
A
MB
A
A
JC
A
A
A
if v[i][j] == '.' { return '.'; }
| ^^^^ slice indices are of type `usize` or ranges of `usize`
JC
JC
as usize
будет достаточноA
DN
DO