Skip to content
TheChatArchiveThe Chat Archive
DeepSeekDeepseek v3.2· deepseekHugging Face Frontier Reasoning Traces

In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of…

  1. User

    In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).

    A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is o, it means the ramen should be topped with boiled egg; if that character is x, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.

    Write a program that, when S is given, prints the price of the corresponding bowl of ramen.

    Constraints

    • S is a string of length 3.
    • Each character in S is o or x. Input

    Input is given from Standard Input in the following format:

    S

    Output

    Print the price of the bowl of ramen corresponding to S.

    Examples

    Input

    oxo

    Output

    900

    Input

    ooo

    Output

    1000

    Input

    xxx

    Output

    700

  2. DeepSeek Assistant

    We need to solve a simple problem: given a string S of length 3 consisting of characters 'o' and 'x', each 'o' indicates a topping is added costing 100 yen. Base cost is 700 yen. So total cost = 700 + 100 * (count of 'o' in S). Print that integer.

    Implementation: read S from input, count number of 'o's, compute price, print.

    Edge cases: none, length exactly 3.

    We'll write Python code.

    But the instructions: "Write a program that, when S is given, prints the price of the corresponding bowl of ramen." So we can do that.

    We'll produce final answer with code. ```python

    def main(): S = input().strip() # Count the number of 'o' characters toppings = S.count('o') price = 700 + toppings * 100 print(price)

    if name == "main": main()