結果
問題 | No.1047 Zero (Novice) |
ユーザー |
![]() |
提出日時 | 2020-05-08 21:51:46 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 414 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 29,568 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 00:31:05 |
合計ジャッジ時間 | 738 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> typedef long long ll; int hikaku(const void *n1,const void *n2) { return -*(int*)n1+*(int*)n2; } int main() { int a,b,ans; scanf("%d %d",&a,&b); if(b==0) { ans=1; } else if(a==-1) { ans=2; } else { ans=-1; } printf("%d\n",ans); return 0; }