結果

問題 No.1003 サイコロの実装 (1)
ユーザー omgitskuu
提出日時 2020-03-21 11:06:30
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 11,685 ms
コンパイル使用メモリ 405,804 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-21 08:50:57
合計ジャッジ時間 13,052 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: variable does not need to be mutable
 --> src/main.rs:7:7
  |
7 |   let mut a :i32 = read();
  |       ----^
  |       |
  |       help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

ソースコード

diff #

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
fn main(){
  let mut a :i32 = read();

  let answer = if a % 6 ==0{ 
  "Yes" } else{
  "No"};

  println!("{}", answer)
}
0