solutions: 791A
This commit is contained in:
parent
e065988632
commit
d5331cdee9
1 changed files with 19 additions and 0 deletions
19
solutions/rust/src/bin/791A.rs
Normal file
19
solutions/rust/src/bin/791A.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
use std::io;
|
||||
|
||||
fn main() {
|
||||
let mut s = String::new();
|
||||
io::stdin().read_line(&mut s).unwrap();
|
||||
|
||||
let a = s.trim().split_whitespace().map(|s| s.parse::<u64>().unwrap()).collect::<Vec<u64>>();
|
||||
let mut l = a[0];
|
||||
let mut b = a[1];
|
||||
|
||||
let mut y = 0;
|
||||
while l <= b {
|
||||
y += 1;
|
||||
b *= 2;
|
||||
l *= 3;
|
||||
}
|
||||
|
||||
println!("{}", y);
|
||||
}
|
Loading…
Reference in a new issue