結果
問題 |
No.1412 Super Ryuo
|
ユーザー |
![]() |
提出日時 | 2025-03-26 11:26:03 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 24,960 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-26 11:26:05 |
合計ジャッジ時間 | 1,320 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
コンパイルメッセージ
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("%lld %lld %lld %lld",&a,&b,&c,&d); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> void main(void){ long long int a,b,c,d; scanf("%lld %lld %lld %lld",&a,&b,&c,&d); int x = c-a; if(x < 0){ x *= -1; } long long int y = d-b; if(y < 0){ y *= -1; } if(x == 0 || y == 0 || x+y <= 3){ printf("1"); }else{ printf("2"); } }