#![allow(non_snake_case)] use proconio::*; // https://maguro.dev/blog/debug-macro/ #[allow(unused_macros)] macro_rules! debug { ($($a:expr),* $(,)*) => { #[cfg(debug_assertions)] eprintln!(concat!($("| ", stringify!($a), " = {:?} "),*, "|"), $(&$a),*); }; } fn main() { std::thread::Builder::new() .stack_size(256 * 1024 * 1024) .spawn(solve) .unwrap() .join() .unwrap(); } // 真ん中に置いてそっから周辺に置いていくみたいに操作すると良い? // 6 の倍数ずつ置ける fn solve() { input! { a: usize, b: usize, } let mut now = 0; if b <= a { now += 1; let mut i = 1; while 2 * i * b <= a { now += 6 * i; i += 1; } } let res = if now % 2 == 0 { "K" } else { "S" }; println!("{res}"); }