簡體   English   中英

如何在SPOJ問題硬幣中的Python中進行輸入?

[英]How to take input in Python in SPOJ problem COINS?

誰能幫助我如何接受以下問題中所述的輸入(提供鏈接)。 我只想知道Python 3.7語言中輸入部分的實現。 請不要分享您對主要問題的回答或邏輯。

https://www.spoj.com/problems/COINS/

while True:
    try:
        value = int(input()) # Bytelandian coins can only have integer values.
    except:
        break
    # your code to find and print the dollars you can make for a coin worth 'value' goes here
    ...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM