結果
| 問題 | No.1236 長針と短針 |
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2020-09-28 11:35:56 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 440 bytes |
| 記録 | |
| コンパイル時間 | 1,626 ms |
| コンパイル使用メモリ | 83,828 KB |
| 実行使用メモリ | 42,680 KB |
| 最終ジャッジ日時 | 2026-03-22 22:25:13 |
| 合計ジャッジ時間 | 3,933 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int all = 12 * 60 * 60;
TreeSet<Integer> sames = new TreeSet<>();
for (int i = 1; i <= 11; i++) {
sames.add(all * i / 11);
sames.add(all * i / 11 + all);
}
int second = a * 3600 + b * 60;
System.out.println(sames.ceiling(second) - second);
}
}
tenten