結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 546 ms
22,436 KB
testcase_01 AC 546 ms
22,460 KB
testcase_02 AC 549 ms
22,228 KB
testcase_03 AC 549 ms
22,404 KB
testcase_04 AC 567 ms
22,260 KB
testcase_05 AC 579 ms
22,312 KB
testcase_06 AC 544 ms
22,468 KB
testcase_07 AC 537 ms
22,372 KB
testcase_08 AC 553 ms
22,460 KB
testcase_09 AC 533 ms
22,300 KB
testcase_10 AC 550 ms
22,276 KB
testcase_11 AC 551 ms
22,368 KB
testcase_12 AC 548 ms
22,376 KB
testcase_13 AC 549 ms
22,520 KB
testcase_14 AC 560 ms
22,696 KB
testcase_15 AC 546 ms
22,308 KB
testcase_16 AC 556 ms
22,428 KB
testcase_17 AC 548 ms
22,436 KB
testcase_18 AC 552 ms
22,456 KB
testcase_19 AC 554 ms
22,644 KB
testcase_20 AC 545 ms
22,352 KB
testcase_21 AC 570 ms
22,612 KB
testcase_22 AC 557 ms
22,280 KB
testcase_23 AC 585 ms
22,328 KB
testcase_24 AC 570 ms
22,528 KB
testcase_25 AC 547 ms
22,668 KB
testcase_26 AC 580 ms
22,312 KB
testcase_27 AC 571 ms
22,380 KB
testcase_28 AC 543 ms
22,392 KB
testcase_29 AC 578 ms
22,592 KB
testcase_30 AC 577 ms
22,296 KB
testcase_31 AC 554 ms
22,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env python3
import sys
n = int(input())
s = input()
c = 0
####################
x = {'hand':15, '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':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':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 > x[k] * (10 ** r[k]) and r[k]<3 and buy[k] > 0:
                cmd += 'enhclick'
                c -= x[k] * (10 ** r[k])
                a[k] *= 2
                d[k] *= 2
                r[k] += 1
                break
            elif c > x[k] * (10 ** r[k]) and r[k]<2 and buy[k] > 0:
                cmd += 'reinforce ' + k
                c -= x[k] * (10 ** r[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]:
                cmd += 'buy ' + k
                c -= b[k]
                b[k] = int(1.2 * b[k])
                d[k] += a[k]
                buy[k] += 1
                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