結果
問題 | No.1198 お菓子配り-1 |
ユーザー |
![]() |
提出日時 | 2020-08-28 21:29:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 473 bytes |
コンパイル時間 | 1,582 ms |
コンパイル使用メモリ | 167,292 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-13 23:49:27 |
合計ジャッジ時間 | 2,137 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 WA * 2 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long int ll;typedef pair<ll, ll> P;typedef vector<ll> VI;typedef vector<VI> VVI;const ll MOD = 1000000007;const ll INF = 1e18;#define REP(i, n) for(int i = 0; i < n; i++)#define ALL(v) v.begin(), v.end()int main(){string s; cin >> s;int n=s.size(), a;if(n>=2)a=(s[n-2]-'0')*10+(s[n-1]-'0');elsea=(s[n-1]-'0');if(a%4==0||a%2==1)cout << 1 << endl;elsecout << -1 << endl;return 0;}