結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
FromBooska
|
| 提出日時 | 2024-03-18 16:07:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 5,000 ms |
| コード長 | 1,290 bytes |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 82,080 KB |
| 実行使用メモリ | 54,008 KB |
| 最終ジャッジ日時 | 2024-09-30 04:58:20 |
| 合計ジャッジ時間 | 1,445 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
# 2か所にでてくるlとoをどう分けるか、まあ平均的に分けた方がいいだろう
d_count = 0
e_count = 0
h_count = 0
l_count = 0
o_count = 0
r_count = 0
w_count = 0
for i in range(26):
c = int(input())
if i == 3:
d_count = c
elif i == 4:
e_count = c
elif i == 7:
h_count = c
elif i == 11:
l_count = c
elif i == 14:
o_count = c
elif i == 17:
r_count = c
elif i == 22:
w_count = c
#print('l_count', l_count, 'o_count', o_count)
if l_count < 3:
l1 = 0
l2 = 0
else:
excess = l_count-3
#print('excess', excess)
highest = 0
alloc1 = -1
for allocate1 in range(0, excess+1):
calc = ((2+allocate1)*(2+allocate1-1)//2)*(1+(excess-allocate1))
#print('allocate1', allocate1, 'calc', calc, 'highest', highest, 'alloc1', alloc1)
if calc > highest:
highest = calc
alloc1 = allocate1
l1 = 2+alloc1
l2 = 1+(excess-alloc1)
if o_count < 2:
o1 = 0
o2 = 0
else:
excess = o_count-2
o1 = 1+(excess)//2
o2 = 1+(excess+1)//2
#print(l1, l2, o1, o2)
ans = 1
ans *= h_count
ans *= e_count
ans *= l1*(l1-1)//2
ans *= o1
ans *= w_count
ans *= o2
ans *= r_count
ans *= l2
ans *= d_count
print(ans)
FromBooska