結果

問題 No.2479 Sum of Squares
ユーザー twooimptwooimp
提出日時 2023-09-22 21:27:06
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
MLE  
実行時間 -
コード長 252 bytes
コンパイル時間 2,416 ms
コンパイル使用メモリ 247,680 KB
実行使用メモリ 814,096 KB
最終ジャッジ日時 2024-07-08 12:08:10
合計ジャッジ時間 4,885 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other MLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll=long long;

int main(){
  ll s;
  cin>>s;
  vector<ll> a;
  while(s){
    ll val=sqrt(s);
    s-=val*val;
    a.push_back(val*val);
  }
  cout<<a.size()<<endl;
  for(ll u:a){
    cout<<u<<" ";
  }
}
0