結果
| 問題 |
No.3065 Speedrun (Normal)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 22:28:31 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 621 bytes |
| コンパイル時間 | 13,608 ms |
| コンパイル使用メモリ | 379,500 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-21 22:28:58 |
| 合計ジャッジ時間 | 13,941 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 7 |
コンパイルメッセージ
warning: unused imports: `HashMap`, `HashSet`, and `process::exit`
--> src/main.rs:2:5
|
2 | process::exit,
| ^^^^^^^^^^^^^
3 | collections::{
4 | HashSet,
| ^^^^^^^
5 | HashMap,
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `marker::Chars`
--> src/main.rs:10:5
|
10 | marker::Chars,
| ^^^^^^^^^^^^^
warning: function `yes_no` is never used
--> src/main.rs:14:4
|
14 | fn yes_no(cdt: bool) {
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
ソースコード
use std::{
process::exit,
collections::{
HashSet,
HashMap,
},
};
use proconio::{
input,
marker::Chars,
};
// use itertools::*;
fn yes_no(cdt: bool) {
println!("{}", if cdt { "Yes" } else { "No" })
}
fn main() {
input! {
a: [usize; 4],
q: [usize; 4],
mut t: usize,
}
let mut ans: usize = 0;
for i in 0..4 {
// println!("{t} {ans}");
if a[i]*q[i] <= t {
t -= a[i]*q[i];
ans += a[i];
continue;
}
ans += t/q[i];
t -= q[i]*(t/q[i]);
}
println!("{ans}");
}