結果

問題 No.661 ハローキティはりんご3個分
ユーザー nisizawanisizawa
提出日時 2018-08-21 18:04:10
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 508 bytes
コンパイル時間 1,412 ms
コンパイル使用メモリ 137,916 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-22 10:32:43
合計ジャッジ時間 2,058 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::stdin;

fn get_int() -> i32 {
    let mut line = String::new();
    stdin().read_line(&mut line).ok();
    line.trim().parse().unwrap()
}

fn main() {
    let i: i32 = get_int();
    
    for _ in 0..i {
        let n: i32 = get_int();
        
        if n % 80 == 0 {
            println!("ikisugi");
        } else if n % 8 == 0 {
            println!("iki");
        } else if n % 10 == 0 {
            println!("sugi");
        } else {
            println!("{}", n / 3);
        }
    }
}
0