結果

問題 No.1236 長針と短針
コンテスト
ユーザー hiragn
提出日時 2022-11-19 12:10:00
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 2,000 ms
+ 8µs
コード長 267 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 368 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 15,788 KB
最終ジャッジ日時 2026-08-31 19:38:40
合計ジャッジ時間 3,946 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from bisect import bisect_left


def main():
    a, b = map(int, input().split())

    lst = [i * 12 * 3600 // 11 for i in range(12)]
    cur = (a % 12) * 3600 + b * 60
    ans = lst[bisect_left(lst, cur)] - cur
    print(ans)


if __name__ == "__main__":
    main()
0