結果
問題 | No.63 ポッキーゲーム |
ユーザー | vwxyz |
提出日時 | 2021-07-27 15:47:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 260 ms / 5,000 ms |
コード長 | 775 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 87,136 KB |
実行使用メモリ | 91,884 KB |
最終ジャッジ日時 | 2023-09-30 19:08:16 |
合計ジャッジ時間 | 8,188 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 257 ms
91,704 KB |
testcase_01 | AC | 253 ms
91,708 KB |
testcase_02 | AC | 252 ms
91,508 KB |
testcase_03 | AC | 251 ms
91,476 KB |
testcase_04 | AC | 253 ms
91,516 KB |
testcase_05 | AC | 254 ms
91,504 KB |
testcase_06 | AC | 254 ms
91,648 KB |
testcase_07 | AC | 253 ms
91,624 KB |
testcase_08 | AC | 254 ms
91,488 KB |
testcase_09 | AC | 256 ms
91,764 KB |
testcase_10 | AC | 253 ms
91,732 KB |
testcase_11 | AC | 254 ms
91,676 KB |
testcase_12 | AC | 256 ms
91,576 KB |
testcase_13 | AC | 257 ms
91,672 KB |
testcase_14 | AC | 257 ms
91,616 KB |
testcase_15 | AC | 257 ms
91,672 KB |
testcase_16 | AC | 260 ms
91,456 KB |
testcase_17 | AC | 258 ms
91,884 KB |
testcase_18 | AC | 259 ms
91,776 KB |
testcase_19 | AC | 253 ms
91,628 KB |
testcase_20 | AC | 253 ms
91,620 KB |
testcase_21 | AC | 256 ms
91,452 KB |
ソースコード
import bisect import copy import decimal import fractions import heapq import itertools import math import random import sys from collections import Counter,deque,defaultdict from functools import lru_cache,reduce from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max def _heappush_max(heap,item): heap.append(item) heapq._siftdown_max(heap, 0, len(heap)-1) def _heappushpop_max(heap, item): if heap and item < heap[0]: item, heap[0] = heap[0], item heapq._siftup_max(heap, 0) return item from math import gcd as GCD, inf read=sys.stdin.read readline=sys.stdin.readline readlines=sys.stdin.readlines L,K=map(int,readline().split()) a,b=divmod(L,K) if a%2==0 and b==0: a=a//2-1 else: a//=2 ans=a*K print(ans)