結果
| 問題 | No.1198 お菓子配り-1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-06 21:03:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 600 bytes |
| コンパイル時間 | 1,669 ms |
| コンパイル使用メモリ | 167,820 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-26 15:35:07 |
| 合計ジャッジ時間 | 2,350 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
typedef long long ll;
typedef unsigned long long ull;
const int MAX = 1e9;
const int MIN = -1*1e9;
const ll MAXLL = 1e18;
const ll MINLL = -1*1e18;
//const ll MOD = 998244353;
//const ll MOD = 1000000007;
int main()
{
string S; cin >> S;
if((S[S.size()-1] - '0')%2 != 0)
{
cout << 1 << endl;
return 0;
}
reverse(S.begin(),S.end());
if(S.size() != 1) S = S.substr(0,2);
reverse(S.begin(),S.end());
cout << (stoi(S)%4==0 ? 1: -1) << endl;
return 0;
}