結果
問題 | No.2479 Sum of Squares |
ユーザー |
|
提出日時 | 2024-07-20 21:56:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
MLE
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 13,445 ms |
コンパイル使用メモリ | 378,836 KB |
実行使用メモリ | 821,888 KB |
最終ジャッジ日時 | 2024-07-20 21:57:08 |
合計ジャッジ時間 | 18,478 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | MLE * 1 -- * 21 |
ソースコード
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(" "))}