結果

問題 No.780 オフ会
ユーザー subsn
提出日時 2023-06-20 10:20:32
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 21:14:46
合計ジャッジ時間 932 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:8:24: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    8 |         printf("%d\n", abs(b - a));
      |                        ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include <math.h>
  +++ |+#include <stdlib.h>
    3 | int main(){

ソースコード

diff #

#include <stdio.h>
#include <math.h>
int main(){
	int a, b;
	scanf("%d%d",&a,&b);
	a++;
	a <= b ? puts("YES") : puts("NO");
	printf("%d\n", abs(b - a));
}
0