結果
| 問題 |
No.1236 長針と短針
|
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2020-09-28 11:35:56 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 138 ms / 2,000 ms |
| コード長 | 440 bytes |
| コンパイル時間 | 2,204 ms |
| コンパイル使用メモリ | 75,220 KB |
| 実行使用メモリ | 41,496 KB |
| 最終ジャッジ日時 | 2024-07-01 20:29:09 |
| 合計ジャッジ時間 | 6,328 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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