結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  string N;
  cin >> N;
  N = '0' + N;
  string S = N.substr(N.size() - 2);
  int d = stoi(S);
  if (d % 2 == 1 || d % 4 == 0){
    cout << 1 << endl;
  } else {
    cout << -1 << endl;
  }
}
0