結果
問題 | No.1198 お菓子配り-1 |
ユーザー |
|
提出日時 | 2020-08-28 22:14:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 294 bytes |
コンパイル時間 | 1,568 ms |
コンパイル使用メモリ | 166,348 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-16 09:28:11 |
合計ジャッジ時間 | 2,256 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
#include<bits/stdc++.h>#define int long longusing namespace std;signed main(){string N;cin>>N;if(N=="1" || N=="4"){puts("-1");return 0;}reverse(N.begin(),N.end());N+='0';if(((N[0]-'0')+(N[1]-'0')*10)%4==2)puts("-1");else puts("1");}