python - 如何在 SPOJ 问题硬币中接受 Python 输入?
问题描述
谁能帮助我如何接受以下问题中描述的输入(提供的链接)。我只想知道 Python 3.7 语言中输入部分的实现。请不要分享您对主要问题的回答或逻辑。
解决方案
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
...
推荐阅读
- c - 尝试创建密码时,如何将字符串中的字符更改为整数
- ember.js - Ember 应用程序已被 CORS 策略阻止
- python-3.x - 将数据框转换为矩阵
- python - 在 pyspark sparksession 中检查 Hive 中是否存在表
- excel - VBA 开始要求在以前工作的代码中标注以前没有标注过的变量
- flutter - 断言失败:第 310 行 pos 10:“数据!= null”:在 onResume 中处理 FCM 消息时出错:回调 Flutter
- android - 自 macOS 更新以来,Android Studio 运行缓慢
- sql-server - 在 SQL Server 中使用动态映射批量插入
- python - django模板不显示对象
- php - 为什么我的 PHP 进程在解析 XML 并插入 MongoDB 时退出