Problem
Ran's Dungeon is a single-player luck game in which you enter any single line of text, and the luck that line brings carries Ran up the dungeon. Words cheering Ran on are fine, and so is something silly that just popped into your head. All the luck in a run, from dice rolls to chest grades and item effects, is decided by that one line.
Once you enter a line, Ran climbs the dungeon automatically. Battles and item pickups all happen automatically, and you score points based on the floor Ran reaches.
1. A Line Full of Luck
Enter whatever you like as a single line. It does not have to be a complete sentence. Short words, numbers, and punctuation are also allowed.
- Write a short line that is not too long. If you enter only spaces or text that is too long, the game cannot start. Specifically, you can use up to characters if you write only in Korean (Hangul), and up to characters if you use only English letters or digits.
- Spaces at the start and end of the line are removed. Spaces in the middle are kept as they are.
- The same line always produces the same adventure.
- Which line brings which luck is a secret.
A great-sounding line does not always bring a good result. An unexpected phrase might carry Ran all the way to the top.
2. Ran
Ran starts with no items, attack, health, and maximum health. Ran's starting luck is an integer between and inclusive, determined by the line you enter.
- Ran grows stronger on entering each new floor, including floor . By default, attack and maximum health rise a little each time, and items change how much Ran grows.
- Items change stats such as attack, maximum health, and luck, as well as the way Ran fights. Item effects are applied automatically.
- The higher the luck, the easier it is for Ran to roll good numbers on the dice. Luck has no effect while it is or less, and if the starting luck is negative, luck gained from items first has to make up the shortfall before it takes effect.
The dice used in the game show numbers from to .
3. Floors and Bosses
The dungeon runs from floor to floor . A boss waits on every floor that is a multiple of , and monsters wait on all other floors. The higher the floor, the higher the opponents' base stats.
| Floor | Boss | Traits |
|---|---|---|
| Floors , , , | Asta | High health and relatively low attack. |
| Floors , , , | Maki | Relatively low health and high attack. |
| Floor | All Officers Assemble | A single boss battle in which Asta and Maki appear together. |
| Floor | Laplace | The final boss. |
If Ran falls and can no longer revive, the adventure ends on that floor. If a battle is still undecided after clashes, it counts as a loss for Ran.
4. Chests and Items
Chest grades, from lowest to highest, are Wood, Silver, Gold, Rainbow. By default, higher-grade chests appear more rarely, and each grade offers different items.
When you obtain most items, two dice are rolled to set the enhancement level of the effect. The general rules are as follows.
| Sum of the two dice | Result |
|---|---|
| The effect is reversed. | |
| or | The effect is weaker than the base effect. |
| to | The base effect applies. |
| or | The effect is enhanced. |
| The effect is enhanced even more, and extra dice are rolled. |
If the sum is , two more dice are rolled. If the sum of the two extra dice is or more, the enhancement level goes up one more step and two dice are rolled again. The extra rolls end when the sum is or less or the enhancement cap is reached. How the enhancement level is reflected in the actual effect differs by item.
If luck adds an extra die, the sum of the two highest of the three dice is used.
When an item is obtained, a mutation may occur with a certain probability, changing its name, appearance, and effect. Luck also affects the chance of item mutation.
5. End of a Run and Scoring
A run ends when Ran loses a battle or defeats Laplace on floor .
| Outcome | Score |
|---|---|
| Ran is defeated on floor | points |
| Defeat Laplace on floor and clear the dungeon | points |
| The input breaks the rules | points |
The floor where Ran falls also counts as a floor reached. For example, falling on floor gives points, and reaching floor without defeating Laplace gives points. If the input breaks the rules, the run does not start.
How far will your line take Ran? Find the lucky line that reaches the highest floor!
※ Some items in this problem are fan creations that parody Touhou Project and other works, and they are not official content of the original works.
Input
CODE is the signal that means “Please send the line to use for this adventure.” When you receive this signal, send one line of your choice.
| Command | Judge→Player (input) | Player→Judge (output) | Time limit (ms) | Description |
|---|---|---|---|---|
| CODE | CODE |
One line of text | Send the line that decides the luck of this adventure. |
CODEis given only once, at the start of the game. You only need to respond once as well.- Your response can be any sentence, short word, number, and so on.
- You can enter up to characters using only Korean (Hangul), or up to characters using only English letters or digits.
- When mixing them, one Hangul character takes up as much room as three English letters. A space takes up as much room as one English letter, and emoji or other symbols may take up more room depending on the kind.
- Spaces at the start and end of the line are removed, and spaces in the middle are kept as they are. You cannot send only spaces.
- Do not split the line into several lines or put a tab in the middle of it. End the line with a newline so that the response is sent right away.
- If you do not respond within second of receiving the request, or you send something that breaks the input rules, the game does not start and your score is points.
The time limit applies to the time from receiving the CODE request to sending your response. After your line is received, Ran's adventure proceeds automatically with no further requests.
Example
Each row below is an example from a different run. In one run, you answer the CODE request only once.
| Judge→Player input | Player→Judge output |
|---|---|
CODE |
란아 오늘은 꼭대기까지 가자 |
You can use a Korean sentence, or a short phrase that combines English letters and digits. After sending the line, you do not choose any further actions.
Sample code
Author

