結果
問題 |
No.1412 Super Ryuo
|
ユーザー |
|
提出日時 | 2021-03-01 00:15:15 |
言語 | Scala(Beta) (3.6.2) |
結果 |
AC
|
実行時間 | 843 ms / 2,000 ms |
コード長 | 420 bytes |
コンパイル時間 | 6,849 ms |
コンパイル使用メモリ | 260,684 KB |
実行使用メモリ | 65,168 KB |
最終ジャッジ日時 | 2024-10-03 00:27:57 |
合計ジャッジ時間 | 19,779 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val a = BigInt(sc.nextInt) val b = BigInt(sc.nextInt) val c = BigInt(sc.nextInt) val d = BigInt(sc.nextInt) def check(a: BigInt, b: BigInt, c: BigInt, d: BigInt): Boolean = { if(a == c || b == d) return true if((a - c).abs + (b - d).abs <= 3) return true false } println(if (check(a, b, c, d)) 1 else 2) }