2021-08-01から1ヶ月間の記事一覧

【メモ】proconioでデバッグ方法【Rust】

例題ABC081 B atcoder.jp 入力例1 3 8 12 40 use proconio::input; use proconio::source::auto::AutoSource; fn main() { // デバッグ方法 let source = AutoSource::from("3 8 12 40"); input! { from source, n: i32, a: [i32; n] // 数が変わる }; prin…

【メモ】RustでAtCorder入門してみた

入力 https://zenn.dev/toga/books/rust-atcoder/viewer/07-input use proconio::input; fn main() { input! { n: i32, a: i32, b: i32, } println!("{}", a + b + n); } 数字が大きい場合 以下のように使うらしい input! { n: String, }; let n: Vec<u32> = n.ch</u32>…