結果
問題 |
No.5018 Let's Make a Best-seller Book
|
ユーザー |
![]() |
提出日時 | 2023-10-01 14:44:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 57 ms / 400 ms |
コード長 | 766 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 10,800 KB |
実行使用メモリ | 24,384 KB |
スコア | 4,226 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 14:45:07 |
合計ジャッジ時間 | 10,108 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
T,N,Money=map(int,input().split()) SELLS=[1]*N S = [0] * N P = [0] * N R = [0] * N for tests in range(T): ALL=Money//500 ALL=min(ALL,500) SUM=sum(SELLS) ANS=[0]*N for i in range(N): ANS[i]=ALL*SELLS[i]//SUM if Money>=8500000: print(2,5,flush=True) elif Money>=4500000: print(2,4,flush=True) elif Money>=2500000: print(2,3,flush=True) elif tests!=0 and Money>=1500000: print(2,2,flush=True) else: print("1",*ANS,flush=True) Money=int(input()) if Money==-1: exit() S=list(map(int,input().split())) P=list(map(int,input().split())) R=list(map(int,input().split())) for i in range(N): SELLS[i]+=S[i]