秋祭 | 静岡高校工学部



卬高杯


提出詳細

提出id提出時刻ユーザー名問題言語判定状況判定実行時間
1149572023-10-25 04:24:55hogeEcpp54/54AC31

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define reps(i,n) for(ll i=1;i<=(n);++i)
#define repr(i,n) for(ll i=2;i*i<=(n);++i)
#define ll long long
#define all(x) (x).begin(),(x).end()
#define sz(x) ((string)(x).size())
#define pb push_back
#define pob pop_back()
#define setp(x) setprecision((ll)(x))
#define INF (ll)(1000000000000000000)
#define mp make_pair
using namespace std;
using pii=pair<int, int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vc=vector<char>;
using vb=vector<bool>;
using vl=vector<long long>;
using vvi=vector<vi>;
using vvl=vector<vl>;
using vvc=vector<vc>;
using vvb=vector<vb>;
using vpi=vector<pii>;
using vpl=vector<pair<ll,ll>>;
using vs=vector<string>;
using pqi=priority_queue<int>;
using vld=vector<long double>;
vpi fs={mp(1,0),mp(-1,0),mp(0,1),mp(0,-1),mp(1,1),mp(1,-1),mp(-1,-1),mp(-1,1)};
const ll inf=1e18;

int main(){
  ll n; cin>>n;
  vl p;
  while(n%57==0) {
   p.pb(57);
   n/=57;
  }
  ll x=n;
  ll i=2;
  while(i*i<=n){
    if(x%i==0){
      p.pb(i);
      x/=i;
    } else i++;
  }
  if(x!=1) p.pb(x);
  sort(all(p));
  for(ll i:p) cout<<i<<" ";
  cout<<endl;
  return 0;
}

sample1.txt AC 2
sample2.txt AC 2
sample3.txt AC 3
sample4.txt AC 6
case1.txt AC 6
case2.txt AC 6
case3.txt AC 6
case4.txt AC 6
case5.txt AC 6
case6.txt AC 6
case7.txt AC 6
case8.txt AC 6
case9.txt AC 6
case10.txt AC 6
case11.txt AC 6
case12.txt AC 6
case13.txt AC 6
case14.txt AC 7
case15.txt AC 6
case16.txt AC 6
case17.txt AC 6
case18.txt AC 6
case19.txt AC 6
case20.txt AC 6
case21.txt AC 6
case22.txt AC 6
case23.txt AC 6
case24.txt AC 6
case25.txt AC 7
case26.txt AC 7
case27.txt AC 7
case28.txt AC 7
case29.txt AC 7
case30.txt AC 7
case31.txt AC 7
case32.txt AC 7
case33.txt AC 7
case34.txt AC 7
case35.txt AC 7
case36.txt AC 7
case37.txt AC 7
case38.txt AC 7
case39.txt AC 7
case40.txt AC 7
case41.txt AC 7
case42.txt AC 7
case43.txt AC 7
case44.txt AC 7
case45.txt AC 7
case46.txt AC 7
case47.txt AC 27
case48.txt AC 31
case49.txt AC 5
case50.txt AC 3
31 AC31 AC