結果

問題 No.1198 お菓子配り-1
ユーザー ytqm3
提出日時 2021-05-23 12:27:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 2,860 ms
コンパイル使用メモリ 193,164 KB
最終ジャッジ日時 2025-01-21 17:40:16
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
  string N;
  cin>>N;
  reverse(N.begin(),N.end());
  if(2<N.size())
  {
    N.erase(N.begin()+2,N.end());
  }
  reverse(N.begin(),N.end());
  int n=stoi(N);
  cout<<((n%4==0)?1:(n%2==0)?-1:1)<<endl;
}
0