結果
| 問題 |
No.56 消費税
|
| コンテスト | |
| ユーザー |
mottodora
|
| 提出日時 | 2016-10-16 21:32:54 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 430 bytes |
| コンパイル時間 | 12,530 ms |
| コンパイル使用メモリ | 395,792 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-17 17:47:22 |
| 合計ジャッジ時間 | 13,631 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 5 |
ソースコード
fn getline() -> String{
let mut ret = String::new();
std::io::stdin().read_line(&mut ret).ok();
return ret;
}
fn getintvec() -> Vec<i32> {
let s = getline();
s.trim().split_whitespace()
.map(|s| s.parse().unwrap())
.collect()
}
fn main() {
let v = getintvec();
let d = v[0] as f32;
let p = v[1] as f32;
let r = ((d * (100.0 + p))/100.0).floor() as i32;
println!("{}", r);
}
mottodora