結果

問題 No.1236 長針と短針
ユーザー 遭難者遭難者
提出日時 2020-08-08 15:06:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 482 bytes
コンパイル時間 5,947 ms
コンパイル使用メモリ 73,864 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-04-09 18:56:34
合計ジャッジ時間 9,026 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
53,976 KB
testcase_01 AC 112 ms
53,952 KB
testcase_02 AC 115 ms
54,164 KB
testcase_03 AC 105 ms
53,336 KB
testcase_04 AC 106 ms
54,144 KB
testcase_05 AC 106 ms
54,088 KB
testcase_06 AC 98 ms
53,000 KB
testcase_07 AC 105 ms
52,928 KB
testcase_08 AC 102 ms
53,872 KB
testcase_09 AC 96 ms
52,728 KB
testcase_10 AC 98 ms
53,664 KB
testcase_11 AC 92 ms
52,548 KB
testcase_12 AC 121 ms
54,096 KB
testcase_13 AC 118 ms
53,924 KB
testcase_14 AC 107 ms
54,092 KB
testcase_15 AC 97 ms
54,212 KB
testcase_16 AC 105 ms
53,876 KB
testcase_17 AC 100 ms
52,804 KB
testcase_18 AC 95 ms
52,928 KB
testcase_19 AC 106 ms
53,988 KB
testcase_20 AC 98 ms
52,948 KB
testcase_21 AC 119 ms
54,076 KB
testcase_22 AC 118 ms
54,356 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