結果
| 問題 |
No.780 オフ会
|
| コンテスト | |
| ユーザー |
rokuto
|
| 提出日時 | 2019-02-14 14:43:11 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 425 bytes |
| コンパイル時間 | 735 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 11:24:53 |
| 合計ジャッジ時間 | 1,469 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d %d",&a,&b);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int zettai(int a,int b);
int main(void)
{
int a=0,b=0;
scanf("%d %d",&a,&b);
int a_mirror = a+1;
//a_mirror++;
//printf("%d %d",a_mirror,b);
if(a_mirror==b)
{
printf("YES\n");
}
else
{
printf("NO\n");
}
printf("%d\n",zettai(a_mirror,b));
return 0;
}
int zettai(int a,int b)
{
if(a>=b) return (a-b);
else return (b-a);
}
rokuto