結果

問題 No.2775 Nuisance Balls
ユーザー kekenx
提出日時 2024-08-21 20:54:36
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 587 bytes
コンパイル時間 11,273 ms
コンパイル使用メモリ 406,328 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-08-21 20:54:50
合計ジャッジ時間 13,037 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
    mut n: usize,
    }
    let mut s = String::new();
    while n > 0 {
        if n >= 720 {
            s.push('C');
            n -= 720;
        } else if n >= 360 {
            s.push('M');
            n -= 360;
        } else if n >= 180 {
            s.push('S');
            n -= 180;
        } else if n >= 30 {
            s.push('R');
            n -= 30;
        } else if n >= 6 {
            s.push('o');
            n -= 6;
        } else {
            s.push('.');
            n -= 1;
        }
    }
    println!("{s}");
}
0