結果
| 問題 | No.531 エヌスクミ島の平和協定 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-23 22:37:00 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 162 bytes |
| コンパイル時間 | 252 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 11:34:55 |
| 合計ジャッジ時間 | 1,387 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 31 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%ld %ld",&n,&m);
| ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(){
long n,m;
scanf("%ld %ld",&n,&m);
if(n<=m) printf("1\n");
else if(n/2<=m) printf("%ld\n",n/2+n%2);
else printf("-1\n");
return 0;
}