diff --git a/solutions/rust/src/bin/451A.rs b/solutions/rust/src/bin/451A.rs new file mode 100644 index 0000000..bb7521f --- /dev/null +++ b/solutions/rust/src/bin/451A.rs @@ -0,0 +1,28 @@ +use std::io; + +fn main() { + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let a = s.trim().split_whitespace().map(|i| i.parse::().unwrap()).collect::>(); + let mut n = a[0]; + let mut m = a[1]; + + let mut intersections = n*m; + + let mut steps = 0; + + while intersections > 0 { + intersections -= (n+m)-1; + n -= 1; + m -= 1; + + steps += 1; + } + + if (steps+1) % 2 == 0 { + println!("Akshat"); + } else { + println!("Malvika"); + } +}