結果

問題 No.33 アメーバがたくさん
ユーザー takakintakakin
提出日時 2020-06-24 21:13:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 8,604 KB
最終ジャッジ日時 2023-09-16 21:20:39
合計ジャッジ時間 1,121 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,588 KB
testcase_01 AC 17 ms
8,556 KB
testcase_02 AC 17 ms
8,584 KB
testcase_03 AC 17 ms
8,580 KB
testcase_04 AC 18 ms
8,560 KB
testcase_05 AC 17 ms
8,452 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 18 ms
8,472 KB
testcase_09 WA -
testcase_10 AC 18 ms
8,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n,d,t=map(int,input().split())
X=[int(i) for i in input().split()]
import collections
D=collections.defaultdict(list)
for x in X:
  D[x%d].append(x)
ans=0
for x in D.keys():
  A=D[x]
  A.sort()
  ans+=((A[-1]+d*t)-(A[0]-d*t))//d+1
print(ans)

0