結果
問題 |
No.1198 お菓子配り-1
|
ユーザー |
![]() |
提出日時 | 2020-08-28 22:06:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 745 ms |
コンパイル使用メモリ | 64,952 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-14 00:41:06 |
合計ジャッジ時間 | 1,510 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 WA * 4 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; long long N = S.size(); long long A; if (N == 1) A = S[N - 1] - '0'; else A = 10 * (S[N - 2] - '0') + S[N - 1] - '0'; if (A % 4 == 0 || A % 4 == 1) cout << 1 << endl; else cout << -1 << endl; }