結果
問題 |
No.2479 Sum of Squares
|
ユーザー |
![]() |
提出日時 | 2024-11-13 17:46:59 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 11,291 ms |
コンパイル使用メモリ | 222,984 KB |
実行使用メモリ | 434,728 KB |
最終ジャッジ日時 | 2024-11-13 17:47:16 |
合計ジャッジ時間 | 15,736 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | TLE * 1 -- * 21 |
ソースコード
package main import . "fmt" import . "sort" func main() { var s int64 Scan(&s) x:=[]int64{} for s>0 { e:=f(s) e*=e s-=e x=append(x,e) } Println(len(x)) for i,v:=range x { if i>0 { Print(" ") } Print(v) } Println() } func f(n int64) int64 { x:=Search(1e9+1,func(i int)bool { return int64(i)*int64(i)<n }) return int64(x) }