結果

問題 No.5003 物理好きクリッカー
ユーザー ebicochinealebicochineal
提出日時 2018-12-01 05:26:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 579 ms / 10,000 ms
コード長 1,816 bytes
コンパイル時間 70 ms
実行使用メモリ 22,744 KB
スコア 60,541,216,116
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 07:30:54
合計ジャッジ時間 21,086 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 546 ms
22,492 KB
testcase_01 AC 531 ms
22,328 KB
testcase_02 AC 531 ms
22,600 KB
testcase_03 AC 522 ms
22,648 KB
testcase_04 AC 540 ms
22,372 KB
testcase_05 AC 548 ms
22,420 KB
testcase_06 AC 525 ms
22,364 KB
testcase_07 AC 579 ms
22,600 KB
testcase_08 AC 522 ms
22,372 KB
testcase_09 AC 532 ms
22,456 KB
testcase_10 AC 547 ms
22,364 KB
testcase_11 AC 532 ms
22,144 KB
testcase_12 AC 562 ms
22,272 KB
testcase_13 AC 528 ms
22,236 KB
testcase_14 AC 532 ms
22,364 KB
testcase_15 AC 528 ms
22,464 KB
testcase_16 AC 556 ms
22,372 KB
testcase_17 AC 552 ms
22,624 KB
testcase_18 AC 525 ms
22,456 KB
testcase_19 AC 546 ms
22,448 KB
testcase_20 AC 548 ms
22,268 KB
testcase_21 AC 528 ms
22,312 KB
testcase_22 AC 549 ms
22,484 KB
testcase_23 AC 537 ms
22,708 KB
testcase_24 AC 535 ms
22,268 KB
testcase_25 AC 540 ms
22,716 KB
testcase_26 AC 532 ms
22,720 KB
testcase_27 AC 555 ms
22,704 KB
testcase_28 AC 537 ms
22,376 KB
testcase_29 AC 539 ms
22,664 KB
testcase_30 AC 536 ms
22,312 KB
testcase_31 AC 536 ms
22,436 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':1, 'lily':1, 'factory':1, 'casino':1, 'grimoire':1}

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] * 10 and r[k]:
                cmd += 'enhclick'
                c -= 15*a[k]
                a[k] *= 2
                d[k] *= 2
                r[k] = 0
                break
            elif c > b[k]*10 and a[k] * 5 < d[k] <= a[k] * 10 and r[k]:
                if b[k] >= 10000000 and i > n-200 : continue
                cmd += 'reinforce ' + k
                c -= b[k]
                a[k] *= 2
                d[k] *= 2
                r[k] = 0
                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