23 1 1 1 2 1 1
46
He can bring $46$ acorns to the nest, as follows:
* In Exchange $A$, trade $23$ acorns for $23$ grams of gold. {acorns, gold, silver, bronze}={ $0,23,0,0$ }
* In Exchange $B$, trade $23$ grams of gold for $46$ acorns. {acorns, gold, silver, bronze}={ $46,0,0,0$ }
* In Exchange $A$, trade nothing. {acorns, gold, silver, bronze}={ $46,0,0,0$ }
He cannot have $47$ or more acorns, so the answer is $46$.{
"problem": {
"name": "Squirrel Merchant",
"description": {
"content": "The squirrel Chokudai has $N$ acorns. One day, he decides to do some trades in multiple precious metal exchanges to make more acorns. His plan is as follows: 1. Get out of the nest with $N$ acorns i",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "diverta2019_2_d"
},
"statements": [
{
"statement_type": "Markdown",
"content": "The squirrel Chokudai has $N$ acorns. One day, he decides to do some trades in multiple precious metal exchanges to make more acorns.\nHis plan is as follows:\n\n1. Get out of the nest with $N$ acorns i...",
"is_translate": false,
"language": "English"
}
]
}