結果

問題 No.192 合成数
ユーザー ciel
提出日時 2015-07-17 00:13:07
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 19,838 ms
コンパイル使用メモリ 390,360 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 01:41:55
合計ジャッジ時間 15,322 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused `Result` that must be used
 --> src/main.rs:3:2
  |
3 |     std::io::stdin().read_line(&mut __str);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this `Result` may be an `Err` variant, which should be handled
  = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
  |
3 |     let _ = std::io::stdin().read_line(&mut __str);
  |     +++++++

ソースコード

diff #

fn getint() -> i32{
	let mut __str=String::new();
	std::io::stdin().read_line(&mut __str);
	let l=__str.len();
	__str.truncate(l-1);
	return i32::from_str_radix(&__str,10).unwrap();
}

fn main(){
	let n=getint();
	println!("{}",n/2*2);
}
0