結果
| 問題 |
No.1412 Super Ryuo
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-26 11:23:44 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 300 bytes |
| コンパイル時間 | 382 ms |
| コンパイル使用メモリ | 24,064 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-26 11:23:46 |
| 合計ジャッジ時間 | 1,056 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d %d %d %d",&a,&b,&c,&d);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
void main(void){
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
int x = c-a;
if(x < 0){
x *= -1;
}
int y = d-b;
if(y < 0){
y *= -1;
}
if(x == 0 || y == 0 || x+y <= 3){
printf("1");
}else{
printf("2");
}
}
Maeda