結果

問題 No.1236 長針と短針
ユーザー bluemeganebluemegane
提出日時 2021-04-16 18:54:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 2,432 ms
コンパイル使用メモリ 62,948 KB
実行使用メモリ 22,728 KB
最終ジャッジ日時 2023-09-15 17:28:54
合計ジャッジ時間 5,542 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,652 KB
testcase_01 AC 58 ms
22,648 KB
testcase_02 AC 60 ms
22,680 KB
testcase_03 AC 58 ms
20,612 KB
testcase_04 AC 58 ms
20,644 KB
testcase_05 AC 58 ms
22,672 KB
testcase_06 AC 57 ms
20,676 KB
testcase_07 AC 57 ms
22,644 KB
testcase_08 AC 57 ms
20,600 KB
testcase_09 AC 57 ms
20,652 KB
testcase_10 AC 57 ms
20,692 KB
testcase_11 AC 56 ms
20,672 KB
testcase_12 AC 58 ms
22,684 KB
testcase_13 AC 57 ms
20,564 KB
testcase_14 AC 58 ms
20,660 KB
testcase_15 AC 57 ms
20,556 KB
testcase_16 AC 57 ms
22,676 KB
testcase_17 AC 58 ms
20,648 KB
testcase_18 AC 57 ms
20,664 KB
testcase_19 AC 58 ms
22,728 KB
testcase_20 AC 57 ms
20,816 KB
testcase_21 AC 57 ms
20,608 KB
testcase_22 AC 57 ms
22,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = int.Parse(line[0]);
        var b = int.Parse(line[1]);
        getAns(a, b);
    }
    static void getAns(int a, int b)
    {
        var L = b * 6d;
        var s = 30 * a + b / 2d;
        if (s >= 360d) s -= 360d;
        if (L <= s) { Console.WriteLine((int)(120d * (s - L) / 11d)); return; }
        var k = 360d - 6d * b + s;
        Console.WriteLine((int)(120d * k / 11d));
    }
}
0