結果

問題 No.1198 お菓子配り-1
ユーザー FF256grhy
提出日時 2020-09-02 00:26:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 2,237 ms
コンパイル使用メモリ 192,592 KB
最終ジャッジ日時 2025-01-14 03:22:39
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define SI(v) static_cast<int>(v.size())
int main() {
	string s; cin >> s;
	auto v = stoi(s.substr(max(0, SI(s) - 2)));
	cout << (s == "1" || s == "4" || v % 4 == 2 ? -1 : 1) << endl;
}
0