提出 #28862138


ソースコード 拡げる

import math

N,L,W = list(map(int, input().split()))
a = list(map(int, input().split()))

nums = [0]
for i in a:
    nums.append(i)
    nums.append(i+W)
nums.append(L-1)

cnt = 0
for i in range(N+1):
    left = nums[2*i]
    right = nums[2*i+1]
    if left < right:
        cnt += math.ceil((right - left)/W)

print(cnt)

提出情報

提出日時
問題 A - Bridge and Sheets
ユーザ T_death
言語 PyPy3 (7.3.0)
得点 0
コード長 338 Byte
結果 WA
実行時間 104 ms
メモリ 102188 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 300
結果
AC × 3
AC × 11
WA × 2
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 104 ms 97616 KiB
hand_02.txt WA 99 ms 102188 KiB
hand_03.txt AC 49 ms 61880 KiB
hand_04.txt WA 95 ms 98408 KiB
hand_05.txt AC 95 ms 98420 KiB
random_01.txt AC 93 ms 98380 KiB
random_02.txt AC 90 ms 98220 KiB
random_03.txt AC 86 ms 95200 KiB
random_04.txt AC 59 ms 69308 KiB
random_05.txt AC 79 ms 86068 KiB
sample_01.txt AC 53 ms 61788 KiB
sample_02.txt AC 52 ms 61896 KiB
sample_03.txt AC 50 ms 61884 KiB