結果

問題 No.744 循環小数N桁目 Easy
コンテスト
ユーザー elphe
提出日時 2026-02-07 12:18:45
言語 Rust
(1.99.0 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 851µs
コード長 404 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,231 ms
コンパイル使用メモリ 181,036 KB
実行使用メモリ 9,828 KB
最終ジャッジ日時 2026-10-12 17:39:40
合計ジャッジ時間 5,686 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fn main() {
    let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
    let mut stdin = stdin.split_ascii_whitespace();

    let n: usize = stdin.next().unwrap().parse().unwrap();

    println!("{}", output(solve(n)));
}

fn solve(n: usize) -> char {
    const DIGITS: [char; 6] = ['2', '8', '5', '7', '1', '4'];
    DIGITS[(n - 1) % DIGITS.len()]
}

fn output(ans: char) -> char {
    ans
}
0