結果

問題 No.552 十分簡単な星1の問題
ユーザー ytqm3ytqm3
提出日時 2021-06-03 22:35:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 5,565 bytes
コンパイル時間 1,557 ms
コンパイル使用メモリ 167,476 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 17:35:01
合計ジャッジ時間 2,909 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 2 ms
5,376 KB
testcase_35 AC 2 ms
5,376 KB
testcase_36 AC 2 ms
5,376 KB
testcase_37 AC 2 ms
5,376 KB
testcase_38 AC 2 ms
5,376 KB
testcase_39 AC 2 ms
5,376 KB
testcase_40 AC 2 ms
5,376 KB
testcase_41 AC 2 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
testcase_43 AC 2 ms
5,376 KB
testcase_44 AC 2 ms
5,376 KB
testcase_45 AC 2 ms
5,376 KB
testcase_46 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
typedef uint32_t uint;
typedef uint64_t u64;
typedef int64_t i64;
typedef long double f128;
using namespace std;

template<u64 mod>class modint{
public:
  u64 val;
  constexpr modint(const u64 x=0) noexcept:val(x%mod){}
  constexpr u64 &value() noexcept{
    return val;
  }
  constexpr const u64 &value() const noexcept{
    return val;
  }
  constexpr modint operator+(const modint rhs) const noexcept{
    return modint(*this)+=rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept{
    return modint(*this)-=rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept{
    return modint(*this)*=rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept{
    return modint(*this)/=rhs;
  }
  constexpr modint operator^(const u64 rhs) const noexcept{
    return modint(*this)^=rhs;
  }
  constexpr bool operator==(const modint rhs) const noexcept{
    return (*this).val==rhs.val;
  }
  constexpr bool operator!=(const modint rhs) const noexcept{
    return (*this).val!=rhs.val;
  }
  constexpr modint &operator+=(const modint rhs) noexcept{
    val+=rhs.val;
    if(val>=mod){
      val-=mod;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept{
    if(val<rhs.val){
      val+=mod;
    }
    val-=rhs.val;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept{
    val=val*rhs.val%mod;
    return *this;
  }
  constexpr modint &operator/=(modint rhs) noexcept{
    u64 exp=mod-2;
    while(exp){
      if(exp&1){
        (*this)*=rhs;
      }
      rhs*=rhs;
      exp>>=1;
    }
    return *this;
  }
  constexpr modint &operator^=(u64 rhs) noexcept{
    modint a=(*this);
    (*this)=1;
    while(rhs){
      if(rhs&1){
        (*this)*=a;
      }
      a*=a;
      rhs>>=1;
    }
    return *this;
  }
  friend constexpr ostream &operator<<(ostream &os,const modint &x) noexcept{
    return os<<(x.val);
  }
  friend constexpr istream &operator>>(istream &is,modint &x) noexcept{
    u64 t;
    is>>t;
    x=t;
    return is;
  }
};

void scan(){}

template<typename T,class... Args>
void scan(T& n,Args&... args){
  cin>>n;
  scan(args...);
}

template<typename T>
void scanall(T start,T end){
  T now=start;
  for(;now!=end;++now){
    cin>>(*now);
  }
}

void print(){}

template<typename T,class... Args>
void print(T n,Args... args){
  cout<<n;
  print(args...);
}

template<typename T>
void println(T n){
  cout<<n<<endl;
}

template<typename T,class... Args>
void println(T n,Args... args){
  cout<<n<<' ';
  println(args...);
}

template<typename T>
void printall(T start,T end){
  if(start!=end){
    T now=start;
    cout<<(*now);
    ++now;
    for(;now!=end;++now){
      cout<<' '<<(*now);
    }
  }
  cout<<endl;
}

template<typename T>
vector<T> div_enum(T n){
  vector<T> res;
  for(T i=1;i*i<=n;++i){
    if(n%i!=0){
      continue;
    }
    res.push_back(i);
    if(i*i!=n){
      res.push_back(n/i);
    }
  }
  sort(res.begin(),res.end());
  return res;
}

template<typename T>
vector<pair<T,T>> prime_fact(T n){
  vector<pair<T,T>> res;
  for(T i=2;i*i<=n;++i){
    if(n%i!=0){
      continue;
    }
    T ex=0;
    while(n%i==0){
      n/=i;
      ex+=1;
    }
    res.push_back({i,ex});
  }
  if(n!=1){
    res.push_back({n,1});
  }
  return res;
}

template<typename T,typename U>
T power(T a,U n)
{
  T res=1;
  while(n){
    res*=(n&1)?a:1;
    a*=a;
    n>>=1;
  }
  return res;
}

template<typename T>
struct combination
{
  vector<T> fact;
  combination(const int Max):fact(Max+1,1){
    for(int i=2;i<=Max;++i){
      fact[i]=fact[i-1]*(T)i;
    }
  }
  template<typename U>
  T nCk(U n,U k){
    if(n<k||n<0||k<0){
      return 0;
    }
    return fact[n]/fact[k]/fact[n-k];
  }
};

template<typename T>
struct RSQ{
  int N;
  vector<T> bit;
  RSQ(int size):N(size+1),bit(size+1){};
  void add(int a,T x){
    a+=1;
    for(int i=a;i<N;i+=(i&(-i))){
      bit[i]+=x;
    }
  }
  T sum(int n){
    T res=0;
    for (int i=n;i>0;i-=(i&(-i))){
      res+=bit[i];
    }
    return res;
  }
};

template<typename T>
struct RmQ{
  const T INF=numeric_limits<T>::max();
  int n=-1;
  vector<T> dat;
  RmQ(int n_):dat(n_*4,INF) {
    int x=1;
    while(x<n_){
      x*=2;
    }
    n=x;
  }
  void update(int i,T x){
    i+=n-1;
    dat[i]=x;
    while(i){
      i=(i-1)/2;
      dat[i]=min(dat[i*2+1],dat[i*2+2]);
    }
  }
  T query(int a,int b){
    return query_sub(a,b,0,0,n);
  }
  T query_sub(int a,int b,int k,int l,int r){
    if(r<=a||b<=l){
      return INF;
    }
    else if(a<=l&&r<=b){
      return dat[k];
    }
    else{
      T vl=query_sub(a,b,k*2+1,l,(l+r)/2);
      T vr=query_sub(a,b,k*2+2,(l+r)/2,r);
      return min(vl,vr);
    }
  }
};

template<typename T>
struct unionfind{
  T Max;
  vector<T> par,siz;
  unionfind(T Max_):Max(Max_),par(Max_),siz(Max_,1){
    for(T i=0;i<Max;++i){
      par[i]=i;
    }
  }
  T root(T x){
    if(par[x]==x){
      return x;
    }
    else{
      return par[x]=root(par[x]);
    }
  }
  vector<T> parset(){
    vector<T> res(0);
    for(T i=0;i<Max;++i){
      if(root(i)==i){
        res.push_back(i);
      }
    }
    return res;
  }
  void unite(T x,T y){
    x=root(x);
    y=root(y);
    if(x!=y){
      par[y]=x;
      siz[x]+=siz[y];
    }
  }
  T size(T x){
    return siz[root(x)];
  }
};

void solve();

int main(){
  bool is_multitestcase=0;
  int T=1;
  if(is_multitestcase){
    scan(T);
  }
  for(int i=0;i<T;++i){
    solve();
  }
  return 0;
}

void solve(){
  string N;
  scan(N);
  print(N);
  if(N!="0"){
    println(0);
  }
}
0