結果
| 問題 | No.427 テレビ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-03 07:21:48 |
| 言語 | Java (openjdk 25.0.1) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 2,000 ms |
| コード長 | 946 bytes |
| 記録 | |
| コンパイル時間 | 2,800 ms |
| コンパイル使用メモリ | 84,616 KB |
| 実行使用メモリ | 45,964 KB |
| 最終ジャッジ日時 | 2026-01-03 07:21:55 |
| 合計ジャッジ時間 | 4,819 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
import java.io.*;
import java.util.*;
import java.util.stream.*;
class Process {
private int h;
private int w;
Process(int h, int w) {
this.h = h;
this.w = w;
}
private boolean isVertical() {
return ((h / 4) == (w / 3));
}
String getResult() {
return (isVertical() ? "TATE" : "YOKO");
}
}
public class Main {
public static void main(String[] args) throws IOException {
var bufferedReader = new BufferedReader(new InputStreamReader(System.in));
var printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
// 入力
int[] input = Stream.of(bufferedReader.readLine().trim().split("\\s+")).mapToInt(Integer::parseInt).toArray();
// 処理及び出力
printWriter.println((new Process(input[0], input[1])).getResult());
bufferedReader.close();
printWriter.close();
}
}