結果

問題 No.5003 物理好きクリッカー
ユーザー ebicochinealebicochineal
提出日時 2018-12-01 09:03:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 505 ms / 10,000 ms
コード長 2,086 bytes
コンパイル時間 65 ms
実行使用メモリ 22,848 KB
スコア 90,623,260,325
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 07:33:37
合計ジャッジ時間 18,789 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 493 ms
22,592 KB
testcase_01 AC 494 ms
22,556 KB
testcase_02 AC 494 ms
22,644 KB
testcase_03 AC 496 ms
22,500 KB
testcase_04 AC 488 ms
22,332 KB
testcase_05 AC 492 ms
22,568 KB
testcase_06 AC 495 ms
22,220 KB
testcase_07 AC 501 ms
22,504 KB
testcase_08 AC 495 ms
22,216 KB
testcase_09 AC 494 ms
22,448 KB
testcase_10 AC 491 ms
22,592 KB
testcase_11 AC 496 ms
22,660 KB
testcase_12 AC 505 ms
22,228 KB
testcase_13 AC 491 ms
22,308 KB
testcase_14 AC 495 ms
22,392 KB
testcase_15 AC 498 ms
22,356 KB
testcase_16 AC 492 ms
22,232 KB
testcase_17 AC 492 ms
22,612 KB
testcase_18 AC 494 ms
22,332 KB
testcase_19 AC 493 ms
22,504 KB
testcase_20 AC 494 ms
22,396 KB
testcase_21 AC 504 ms
22,228 KB
testcase_22 AC 493 ms
22,564 KB
testcase_23 AC 497 ms
22,328 KB
testcase_24 AC 493 ms
22,440 KB
testcase_25 AC 491 ms
22,652 KB
testcase_26 AC 493 ms
22,264 KB
testcase_27 AC 494 ms
22,328 KB
testcase_28 AC 500 ms
22,344 KB
testcase_29 AC 499 ms
22,552 KB
testcase_30 AC 497 ms
22,196 KB
testcase_31 AC 495 ms
22,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env python3
import sys
n = int(input())
s = input()
c = 0
####################
base = {'hand':150, 'lily':2000, 'factory':30000, 'casino':600000, 'grimoire':10000000}
basecookie = {'hand':1, 'lily':10, 'factory':120, 'casino':2000, 'grimoire':25000}
b = {'hand':150, 'lily':2000, 'factory':30000, 'casino':600000, 'grimoire':10000000}
cookie = {'hand':1, 'lily':0, 'factory':0, 'casino':0, 'grimoire':0}
r = {'hand':0, 'lily':1, 'factory':1, 'casino':1, 'grimoire':1}
buy = {'hand':1, 'lily':0, 'factory':0, 'casino':0, 'grimoire':0}
g = {'hand':12, 'lily':9, 'factory':9, 'casino':9, 'grimoire':15}
x = {'hand':1, 'lily':1, 'factory':1, 'casino':1, 'grimoire':1}


for i in range(n):
    tc = c
    # print(c, d, file=sys.stderr)
    f=0
    cmd = ''
    if cmd == '' and i >= n - 1 - buy['grimoire']:
        cmd = 'sell grimoire'
    if cmd == '':
        for k in b:
            if k == 'hand' and c > (base[k] // 10) * (11 ** r[k]) and r[k]<3 and buy[k] > 0:
                cmd += 'enhclick'
                c -= (base[k] // 10) * (10 ** r[k])
                x[k] += 1
                r[k] += 1
                break
            elif c > base[k] * (11 ** r[k]) and r[k]<2 and buy[k] > 0:
                if i > n-1000 : continue
                cmd += 'reinforce ' + k
                c -= base[k] * (10 ** r[k])
                x[k] += 1
                r[k] += 1
                break
    if cmd == '':
        for k in b:
            if c > b[k] and buy[k] < g[k]:
                if i > n-1000 : continue
                cmd += 'buy ' + k
                c -= b[k]
                b[k] = int(1.2 * b[k])
                cookie[k] += basecookie[k]
                buy[k] += 1
                break
    
    if cmd == '' :
        cmd = 'click'
        f=1
    else:
        # print(i, tc, c, cookie, file=sys.stderr)
        f=0

    for i, j in cookie.items():
        if i == 'hand' and f:
            c += j * x[i]
        else:
            c += j * x[i]
    print(cmd)####################
    s = input()####################

print(c, cookie, file=sys.stderr)
0