結果
問題 |
No.46 はじめのn歩
|
ユーザー |
|
提出日時 | 2025-01-16 01:45:40 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 326 bytes |
コンパイル時間 | 19,150 ms |
コンパイル使用メモリ | 374,736 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2025-01-16 01:47:26 |
合計ジャッジ時間 | 55,837 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 TLE * 6 |
コンパイルメッセージ
warning: unnecessary parentheses around `while` condition --> src/main.rs:16:11 | 16 | while (b > a) { | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 16 - while (b > a) { 16 + while b > a { | warning: variable `count` is assigned to, but never used --> src/main.rs:13:13 | 13 | let mut count = 0; | ^^^^^ | = note: consider using `_count` instead = note: `#[warn(unused_variables)]` on by default
ソースコード
#![allow(unused_imports)] use proconio::input; use proconio::marker::*; use std::cmp::*; use std::collections::*; fn main() { input! { a: usize, b: usize, } let mut count = 0; let mut ans = 0; while (b > a) { count += a; ans += 1; } println!("{}", ans); }