結果

問題 No.1992 Tendon Walk
ユーザー Schnee
提出日時 2022-07-14 23:40:35
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 14,902 ms
コンパイル使用メモリ 377,572 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 08:36:13
合計ジャッジ時間 13,087 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut i = String::new();
    std::io::stdin().read_line(&mut i).unwrap();
    let i: u32 = i.trim().parse().unwrap();
    
    let mut ans: u32;
    if i == 2 {
        ans = 2;
    } else {
        ans = 5 * i - 10;
        if i%2 == 0 {
            ans -= 6;
        };
    };
    println!("{}", ans);
}
0