結果
問題 | No.1700 floor X |
ユーザー | |
提出日時 | 2024-06-26 13:50:36 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 13,884 ms |
コンパイル使用メモリ | 378,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 13:50:54 |
合計ジャッジ時間 | 15,159 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 44 |
ソースコード
use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec<u64> = s.split_whitespace().skip(1).flat_map(str::parse).collect(); for n in n { let mut x = (n as f64).sqrt().ceil() as u64; while x * x > n { x -= 1; } println!("{x}") } }