結果
| 問題 | No.2479 Sum of Squares |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-20 21:56:39 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 350 bytes |
| 記録 | |
| コンパイル時間 | 5,324 ms |
| コンパイル使用メモリ | 198,696 KB |
| 実行使用メモリ | 1,309,528 KB |
| 最終ジャッジ日時 | 2026-04-03 02:34:37 |
| 合計ジャッジ時間 | 10,029 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 MLE * 1 |
| other | MLE * 2 -- * 20 |
ソースコード
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let mut s: u64 = s.trim().parse().unwrap();
let mut v = vec![];
while s > 0 {
let i = (s as f64).sqrt() as u64;
s -= i * i;
v.push(i);
}
println!(
"{}\n{}",
v.len(),
v.iter()
.map(|x| (x * x).to_string())
.collect::<Vec<_>>()
.join(" ")
)
}