結果

問題 No.499 7進数変換
ユーザー ixTL255
提出日時 2023-01-11 22:50:47
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 12,755 ms
コンパイル使用メモリ 402,608 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-22 16:22:48
合計ジャッジ時間 14,112 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let mut n: usize = n.trim().parse().unwrap();
    let mut ans = String::new();
    while n != 0 {
        ans += &(n % 7).to_string();
        n /= 7;
    }
    println!("{}", ans.chars().rev().collect::<String>());
}
0