fn main() { let amount: u32 = read(); //1でいっぱい作る let num_of_1: u32 = amount / 2; let remaind: u32 = amount % 2; //数字として扱う必要性はない let mut ans: String = String::new(); for _i in 0..(num_of_1 - 1) { ans = "1".to_owned() + &ans[..]; } if remaind == 0 { ans = "1".to_owned() + &ans[..]; } else { ans = "7".to_owned() + &ans[..]; } println!("{}", ans); } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() }