結果
| 問題 |
No.1198 お菓子配り-1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-02 02:54:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 267 bytes |
| コンパイル時間 | 1,680 ms |
| コンパイル使用メモリ | 191,788 KB |
| 最終ジャッジ日時 | 2025-01-14 23:52:05 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string s; cin >> s;
int n = s.size();
int x = s[n-1] - '0';
if(n >= 2) x += (s[n-2] - '0') * 10;
if(x % 2 == 1 || x % 4 == 0) cout << 1 << endl;
else cout << -1 << endl;
return 0;
}