結果

問題 No.1453 手助け
ユーザー mono_0812mono_0812
提出日時 2021-03-31 22:20:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 766 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 10,284 KB
最終ジャッジ日時 2023-08-22 02:33:14
合計ジャッジ時間 2,946 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,168 KB
testcase_01 AC 33 ms
10,088 KB
testcase_02 AC 33 ms
10,192 KB
testcase_03 AC 34 ms
10,100 KB
testcase_04 AC 33 ms
10,084 KB
testcase_05 AC 35 ms
10,204 KB
testcase_06 AC 34 ms
10,280 KB
testcase_07 AC 34 ms
10,224 KB
testcase_08 AC 33 ms
10,092 KB
testcase_09 AC 33 ms
10,136 KB
testcase_10 AC 32 ms
10,164 KB
testcase_11 AC 33 ms
10,100 KB
testcase_12 AC 35 ms
10,132 KB
testcase_13 AC 33 ms
10,092 KB
testcase_14 AC 33 ms
10,276 KB
testcase_15 AC 35 ms
10,284 KB
testcase_16 AC 33 ms
10,116 KB
testcase_17 AC 33 ms
10,164 KB
testcase_18 AC 33 ms
10,212 KB
testcase_19 AC 34 ms
10,156 KB
testcase_20 AC 34 ms
10,120 KB
testcase_21 AC 33 ms
10,208 KB
testcase_22 AC 32 ms
10,236 KB
testcase_23 AC 33 ms
10,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect,collections,copy,heapq,itertools,math,string,sys,queue
from decimal import Decimal
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return map(int,input().split())
def LIIS(): return list(map(int,input().split()))
def ZER(N): return [False for _ in range(N)]
INF=float("inf")
MOD=10**9+7
#     V
#   / ̄ψ ̄\
#  | 合格祈願 |
#  |_____|
##############################################################################
a,b,c,d,e=IIS()
com=b-c
li=[0]*(com*a)
if com==0:
    print(0)
    exit()
li[0]=d
for i in range(1,com*a):
    x=li[i-1]
    if (i+1)%10!=0:
        li[i]=x
    elif (i+1)%10==0 and e<=x:
        li[i]=x-e
    else:
        li[i]=x
print(sum(li))
0