Merge branch 'main' into fix/language-version-ids
This commit is contained in:
commit
10a4df4ce8
2 changed files with 10 additions and 0 deletions
10
1621.rs
Normal file
10
1621.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
use std::io::{self,Read};
|
||||||
|
fn main(){
|
||||||
|
let mut s=String::new();
|
||||||
|
io::stdin().read_to_string(&mut s).unwrap();
|
||||||
|
let s=s.trim().as_bytes();
|
||||||
|
let(mut mx,mut c)=(1usize,1usize);
|
||||||
|
for i in 1..s.len(){if s[i]==s[i-1]{c+=1;}else{c=1;}if c>mx{mx=c;}}
|
||||||
|
println!("{}",mx);
|
||||||
|
}
|
||||||
|
|
||||||
0
a.cc
Normal file
0
a.cc
Normal file
Loading…
Add table
Add a link
Reference in a new issue