結果

問題 No.3098 tan 2
ユーザー so-heyso-hey
提出日時 2023-05-28 12:48:22
言語 Rust
(1.77.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 934 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 138,096 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-27 07:27:38
合計ジャッジ時間 1,264 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `n`
  --> Main.rs:33:13
   |
33 |     let mut n = input_num();
   |             ^ help: if this is intentional, prefix it with an underscore: `_n`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
  --> Main.rs:33:9
   |
33 |     let mut n = input_num();
   |         ----^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: function `input_chars` is never used
 --> Main.rs:7:4
  |
7 | fn input_chars() -> Vec<char> {
  |    ^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: function `input_nums` is never used
  --> Main.rs:13:4
   |
13 | fn input_nums() -> (usize, usize, usize) {
   |    ^^^^^^^^^^

warning: function `input_vec_nums` is never used
  --> Main.rs:24:4
   |
24 | fn input_vec_nums() -> Vec<usize> {
   |    ^^^^^^^^^^^^^^

warning: 5 warnings emitted

ソースコード

diff #

fn input_num() -> usize {
    let mut line: String = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    line.trim().parse().unwrap()
}

fn input_chars() -> Vec<char> {
    let mut line: String = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    line.trim().chars().collect()
}

fn input_nums() -> (usize, usize, usize) {
    let mut line: String = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    let mut iter = line.split_whitespace();
    (
        iter.next().unwrap().parse().unwrap(),
        iter.next().unwrap().parse().unwrap(),
        iter.next().unwrap().parse().unwrap()
    )
}

fn input_vec_nums() -> Vec<usize> {
    let mut line: String = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    line.split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect()
}

fn main() {
    let mut n = input_num();
    println!("No");
}
0