結果

問題 No.661 ハローキティはりんご3個分
ユーザー Tadatoshi TokutakeTadatoshi Tokutake
提出日時 2018-05-24 13:45:52
言語 Rust
(1.77.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 564 bytes
コンパイル時間 1,445 ms
コンパイル使用メモリ 140,136 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-11 02:56:08
合計ジャッジ時間 1,531 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

use std::io::stdin;

fn read_i32() -> i32 {
  let mut s = String::new();
  stdin().read_line(&mut s).unwrap();
  s.trim().parse::<i32>().unwrap()
}

fn main() {
  let count = read_i32();
  let mut inputs: Vec<i32> = vec![];
  for _ in 0..count {
    let input = read_i32();
    inputs.push(input);
  }
  for input in inputs {
    if input % 8 == 0 && input % 10 == 0 {
      println!("ikisugi");
    } else if input % 8 == 0 {
      println!("iki");
    } else if input % 10 == 0 {
      println!("sugi");
    } else {
      println!("{}", input / 3);
    }
  }
}
0