結果
| 問題 |
No.804 野菜が苦手
|
| ユーザー |
nadeshino
|
| 提出日時 | 2020-05-19 18:33:34 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 390 bytes |
| コンパイル時間 | 3,314 ms |
| コンパイル使用メモリ | 64,956 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-01 22:56:54 |
| 合計ジャッジ時間 | 4,026 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
import strutils
let read* = iterator: string =
while true: (for s in stdin.readLine.split: yield s)
template input*(T: static[typedesc]): untyped =
when T is int: read().parseInt
elif T is float: read().parseFloat
elif T is string: read()
elif T is char: read()[0]
let A, B, C, D = input(int)
for R in countdown(A, 0):
if R * C <= B and R + R * C <= D:
echo R; quit(0)
nadeshino