結果
問題 | No.3011 あ、俺こいつの役やりたい! |
ユーザー |
|
提出日時 | 2025-01-25 12:42:20 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 26,527 ms |
コンパイル使用メモリ | 377,280 KB |
実行使用メモリ | 25,856 KB |
平均クエリ数 | 11.50 |
最終ジャッジ日時 | 2025-01-25 22:17:43 |
合計ジャッジ時間 | 13,867 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 |
ソースコード
use proconio::{input, source::line::LineSource}; use std::io::{stdin, stdout, BufReader, Write}; fn main() { let mut source = LineSource::new(BufReader::new(stdin().lock())); let mut x = 1e9 as usize / 2; while x > 0 { println!("{}", x); stdout().flush().unwrap(); input! { from &mut source, result: i8, } if result == 1 { return; } else if result == 0 { x /= 2; } } }