結果

問題 No.5003 物理好きクリッカー
ユーザー ebicochinealebicochineal
提出日時 2018-12-01 07:15:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 569 ms / 10,000 ms
コード長 1,758 bytes
コンパイル時間 174 ms
実行使用メモリ 32,552 KB
スコア 1,078,007
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 07:31:12
合計ジャッジ時間 21,324 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 558 ms
22,316 KB
testcase_01 AC 537 ms
22,628 KB
testcase_02 AC 542 ms
22,204 KB
testcase_03 AC 557 ms
22,648 KB
testcase_04 AC 534 ms
22,600 KB
testcase_05 AC 535 ms
22,608 KB
testcase_06 AC 540 ms
22,572 KB
testcase_07 AC 569 ms
22,628 KB
testcase_08 AC 532 ms
22,224 KB
testcase_09 AC 555 ms
22,364 KB
testcase_10 AC 555 ms
22,276 KB
testcase_11 AC 561 ms
22,576 KB
testcase_12 AC 557 ms
22,144 KB
testcase_13 AC 559 ms
22,356 KB
testcase_14 AC 547 ms
22,584 KB
testcase_15 AC 554 ms
22,480 KB
testcase_16 AC 535 ms
22,572 KB
testcase_17 AC 557 ms
22,652 KB
testcase_18 AC 563 ms
22,352 KB
testcase_19 AC 544 ms
22,568 KB
testcase_20 AC 555 ms
22,576 KB
testcase_21 AC 539 ms
22,632 KB
testcase_22 AC 556 ms
22,524 KB
testcase_23 AC 539 ms
22,380 KB
testcase_24 AC 539 ms
22,100 KB
testcase_25 AC 541 ms
22,244 KB
testcase_26 AC 531 ms
22,372 KB
testcase_27 AC 535 ms
22,200 KB
testcase_28 AC 531 ms
22,456 KB
testcase_29 AC 534 ms
22,696 KB
testcase_30 AC 565 ms
22,384 KB
testcase_31 AC 538 ms
22,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env python3
import sys
n = int(input())
s = input()
c = 0
x = {'hand':150, 'lily':2000, 'factory':30000, 'casino':600000, 'grimoire':10000000}

a = {'hand':1, 'lily':10, 'factory':120, 'casino':2000, 'grimoire':25000}
b = {'hand':150, 'lily':2000, 'factory':30000, 'casino':600000, 'grimoire':10000000}
d = {'hand':1, 'lily':0, 'factory':0, 'casino':0, 'grimoire':0}
r = {'hand':8, 'lily':2, 'factory':2, 'casino':2, 'grimoire':2}

g = {'hand':12, 'lily':9, 'factory':9, 'casino':9, 'grimoire':9}

for i in range(n):
    print(c, d, file=sys.stderr)
    f=0
    cmd = ''
    if cmd == '' and i >= n - 4 and d['casino'] > 0:
        cmd = 'sell casino'
    if cmd == '' and i >= n - 2 and d['grimoire'] > 0:
        cmd = 'sell grimoire'
    if cmd == '':
        for k in b:
            if k == 'hand' and c > 15*a[k] and d[k] <= a[k] * 20 and r[k]:
                cmd += 'enhclick'
                c -= 15*a[k]
                a[k] *= 2
                d[k] *= 2
                r[k] -= 1
                break
            elif c > b[k]*10 and a[k] * 5 < d[k] <= a[k] * 10 and r[k]:
                cmd += 'reinforce ' + k
                c -= b[k]
                a[k] *= 2
                d[k] *= 2
                r[k] -= 1
                break
    if cmd == '':
        for k in b:
            if c > b[k] and d[k] < a[k] * g[k]:
                if b[k] >= 10000000 and i > n-200 : continue
                cmd += 'buy ' + k
                c -= b[k]
                b[k] = int(1.2 * b[k])
                d[k] += a[k]
                break
    
    if cmd == '' :
        cmd = 'click'
        f=1
    print(cmd)
    for i, j in d.items():
        if i == 'hand' and f:
            c += j
        else:
            c += j
    s = input()
0