結果
| 問題 |
No.353 ヘイトプラス
|
| コンテスト | |
| ユーザー |
megumish
|
| 提出日時 | 2016-04-01 22:42:04 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 794 bytes |
| コンパイル時間 | 11,358 ms |
| コンパイル使用メモリ | 404,284 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 13:18:15 |
| 合計ジャッジ時間 | 12,130 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
コンパイルメッセージ
warning: unused import: `std::str::Chars` --> src/main.rs:3:5 | 3 | use std::str::Chars; | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `std::i32` --> src/main.rs:4:5 | 4 | use std::i32; | ^^^^^^^^ warning: unused import: `std::ascii::AsciiExt` --> src/main.rs:5:5 | 5 | use std::ascii::AsciiExt; | ^^^^^^^^^^^^^^^^^^^^ warning: unused import: `std::collections::HashMap` --> src/main.rs:6:5 | 6 | use std::collections::HashMap; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated trait `std::ascii::AsciiExt`: use inherent methods instead --> src/main.rs:5:17 | 5 | use std::ascii::AsciiExt; | ^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: unused import: `std::io::prelude` --> src/main.rs:7:5 | 7 | use std::io::prelude::*; | ^^^^^^^^^^^^^^^^
ソースコード
use std::io;
use std::str::FromStr;
use std::str::Chars;
use std::i32;
use std::ascii::AsciiExt;
use std::collections::HashMap;
use std::io::prelude::*;
fn main() {
let v = next_ints();
println!("{}",v[0]--v[1]);
}
#[allow(dead_code)]
fn next_string() -> String {
let mut input = String::new();
io::stdin().read_line(&mut input).unwrap();
input
}
#[allow(dead_code)]
fn next_strings() -> Vec<String> {
let input = next_string();
input.split_whitespace().map(|x| x.parse().unwrap()).collect()
}
#[allow(dead_code)]
fn next_int() -> i64 {
let input = next_string();
i64::from_str(input.trim()).unwrap()
}
#[allow(dead_code)]
fn next_ints() -> Vec<i64> {
let input = next_string();
input.split_whitespace().map(|x| x.parse().unwrap()).collect()
}
megumish