結果
| 問題 |
No.1198 お菓子配り-1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-28 22:10:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 508 bytes |
| コンパイル時間 | 1,683 ms |
| コンパイル使用メモリ | 167,952 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 00:46:55 |
| 合計ジャッジ時間 | 2,549 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int mod=1000000007;
const int INF=1001001001;
int main() {
string S;
cin>>S;
int n=S.size();
int a=S[n-1]-'0'+10*(S[n-2]-'0');
int b=S[n-1]-'0';
if(a%4==0||b%2!=0){cout<<1<<endl;}
else{cout<<-1<<endl;}
return 0;
}