結果

問題 No.1236 長針と短針
ユーザー 遭難者遭難者
提出日時 2020-08-08 13:48:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 482 bytes
コンパイル時間 2,245 ms
コンパイル使用メモリ 74,056 KB
実行使用メモリ 54,420 KB
最終ジャッジ日時 2024-04-09 03:17:13
合計ジャッジ時間 6,125 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
54,420 KB
testcase_01 AC 127 ms
54,140 KB
testcase_02 AC 127 ms
54,012 KB
testcase_03 AC 128 ms
54,160 KB
testcase_04 AC 126 ms
53,964 KB
testcase_05 AC 113 ms
52,860 KB
testcase_06 AC 124 ms
54,104 KB
testcase_07 AC 125 ms
53,896 KB
testcase_08 AC 128 ms
54,124 KB
testcase_09 AC 129 ms
53,832 KB
testcase_10 AC 126 ms
53,964 KB
testcase_11 AC 128 ms
53,856 KB
testcase_12 AC 129 ms
54,084 KB
testcase_13 AC 128 ms
54,260 KB
testcase_14 AC 126 ms
54,056 KB
testcase_15 AC 124 ms
54,152 KB
testcase_16 AC 127 ms
54,244 KB
testcase_17 AC 114 ms
52,724 KB
testcase_18 AC 127 ms
54,140 KB
testcase_19 AC 128 ms
53,856 KB
testcase_20 AC 129 ms
54,020 KB
testcase_21 AC 117 ms
52,880 KB
testcase_22 AC 114 ms
52,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int a = sc.nextInt() % 12;
                int b = sc.nextInt();
                sc.close();
                double tyo = b * 6.0;
                double tan = (60 * a + b) / 2.0;
                double sa = tan - tyo;
                if(sa < 0) sa += 360;
                System.out.println((int)(sa / 5.5 * 60));
        }
}
0