結果

問題 No.2864 String of yuusaan
コンテスト
ユーザー northward
提出日時 2024-11-11 00:44:47
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 861µs
コード長 865 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 453 ms
コンパイル使用メモリ 179,260 KB
実行使用メモリ 9,924 KB
最終ジャッジ日時 2026-09-21 18:07:21
合計ジャッジ時間 1,995 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `N`
  --> src/main.rs:23:9
   |
23 |     let N = input!(usize);
   |         ^ help: if this is intentional, prefix it with an underscore: `_N`
   |
   = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

#![allow(non_snake_case, unused_must_use, unused_imports)]
use std::io::{self, prelude::*};

fn main() {
    let (stdin, stdout) = (io::read_to_string(io::stdin()).unwrap(), io::stdout());
    let (mut stdin, mut buffer) = (stdin.split_whitespace(), io::BufWriter::new(stdout.lock()));

    macro_rules! input {
        ($t: tt, $n: expr) => {
            (0..$n).map(|_| input!($t)).collect::<Vec<_>>()
        };
        (Chars) => {
            input! {String}.chars().collect::<Vec<_>>()
        };
        (Usize1) => {
            stdin.next().unwrap().parse::<usize>().unwrap() - 1
        };
        ($t: ty) => {
            stdin.next().unwrap().parse::<$t>().unwrap()
        };
    }

    let N = input!(usize);
    let K = input!(Usize1);

    let k = K % 12;
    let a = "yuusaanuusaa".chars().collect::<Vec<_>>()[k];
    writeln!(buffer, "{}", a);
}
0