結果
| 問題 |
No.3011 あ、俺こいつの役やりたい!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 14:33:03 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 912 bytes |
| コンパイル時間 | 28,304 ms |
| コンパイル使用メモリ | 380,448 KB |
| 実行使用メモリ | 26,108 KB |
| 平均クエリ数 | 14.45 |
| 最終ジャッジ日時 | 2025-01-25 23:23:26 |
| 合計ジャッジ時間 | 16,420 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge9 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 44 |
ソースコード
fn main() {
// // input_interactive
// input_interactive!{
// _n: i64,
// }
let mut ans = 1_000_000_000 as i64;
loop {
// output
println!("{}", ans);
// judge
input_interactive!{
x: i64,
}
if x == -1 {
return;
}
else if x == 1 {
println!("{}", ans);
}
else {
ans /= 2;
}
}
}
// const MOD17: usize = 1000000007;
// const MOD93: usize = 998244353;
// const INF: usize = 1 << 60;
// let dx = vec![!0, 0, 1, 0]; // 上左下右
// let dy = vec![0, !0, 0, 1]; // 上左下右
// let d = vec!{(!0, 0), (0, !0), (1, 0), (0, 1)}; // 上左下右
#[allow(unused)]
use proconio::{input_interactive, marker::Chars, marker::Usize1};
#[allow(unused)]
use std::{
mem::swap,
cmp::min, cmp::max,
cmp::Reverse,
collections::HashSet, collections::BTreeSet,
collections::HashMap, collections::BTreeMap,
collections::BinaryHeap,
collections::VecDeque,
iter::FromIterator,
};