結果
問題 |
No.1198 お菓子配り-1
|
ユーザー |
![]() |
提出日時 | 2020-10-03 18:55:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 1,565 ms |
コンパイル使用メモリ | 167,096 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 04:47:07 |
合計ジャッジ時間 | 2,120 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define INF 1000000000 #define MOD 998244353 using ll=long long; using Graph=vector<vector<int>>; int main(){ string S; cin>>S; int N=S.size(); int x; if(N==1){ x=S[0]-'0'; }else{ x=10*(S[N-2]-'0')+(S[N-1]-'0'); } x%=4; if(x==2){ cout<<-1<<endl; }else{ cout<<1<<endl; } }