結果
問題 |
No.780 オフ会
|
ユーザー |
![]() |
提出日時 | 2019-03-12 13:53:09 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 180 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 15:45:52 |
合計ジャッジ時間 | 844 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
コンパイルメッセージ
main.c: In function 'main': main.c:8:15: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration] 8 | printf("%d",abs(a-b+1)); | ^~~ main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs' 2 | #include <math.h> +++ |+#include <stdlib.h> 3 | int main(void){
ソースコード
#include <stdio.h> #include <math.h> int main(void){ int a,b; scanf("%d%d",&a,&b); if(a+1<=b) printf("YES\n"); else printf("NO\n"); printf("%d",abs(a-b+1)); return 0; }