結果
| 問題 |
No.2776 Bigger image
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2024-06-07 21:37:03 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 141 ms / 2,000 ms |
| コード長 | 1,077 bytes |
| コンパイル時間 | 2,123 ms |
| コンパイル使用メモリ | 77,672 KB |
| 実行使用メモリ | 41,772 KB |
| 最終ジャッジ日時 | 2024-12-26 07:20:48 |
| 合計ジャッジ時間 | 6,795 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
long a = sc.nextInt();
long b = sc.nextInt();
long h = sc.nextInt();
long w = sc.nextInt();
sc.close();
if (h * b <= w * a) {
if (h * a <= w * b) {
if (a == b) {
System.out.println("Same");
} else if (b > a) {
System.out.println("Non-rotating");
} else {
System.out.println("Rotating");
}
} else {
if (h == w) {
System.out.println("Same");
} else if (h > w) {
System.out.println("Non-rotating");
} else {
System.out.println("Rotating");
}
}
} else {
if (h * a <= w * b) {
if (h == w) {
System.out.println("Same");
} else if (w > h) {
System.out.println("Non-rotating");
} else {
System.out.println("Rotating");
}
} else {
if (a == b) {
System.out.println("Same");
} else if (a > b) {
System.out.println("Non-rotating");
} else {
System.out.println("Rotating");
}
}
}
}
}
ks2m