Datasets:

Modalities:
Image
Text
Formats:
parquet
Size:
< 1K
Tags:
code
Libraries:
Datasets
pandas
License:
hackercup / 2023 /practice /cheeseburger_corollary_ch1_sol.md
wjomlex's picture
2023 Problems
ff444f7 verified
|
raw
history blame
381 Bytes

Each single provides (2) buns and (1) patty. Each double provides (2) buns and (2) patties. Given (S) singles and (D) doubles, we will have (2*(S + D)) buns and (S + 2*D) patties.

A (K)-decker happens to require (K+1) buns and (K) patties. To know if we can build one, it suffices to check that both (2*(S + D) \ge K + 1) and (S + 2*D \ge K) hold true.