Skip to content

Instantly share code, notes, and snippets.

View ug23's full-sized avatar

Yuji Imagawa ug23

View GitHub Profile
@ug23
ug23 / coupon.scala
Created September 8, 2014 16:23
CTO challenge Level1
/**
* coupon.scala
*
* Usage:% scala couponopt.scala <支払総額> <50円の枚数> <100円の枚数> <500円の枚数>
* 使用可能でかつ最小の枚数になる組み合わせを表示する
*/
object Coupon{
def selectOptimalCoupons(total:Int, coupon:List[Int]) :Unit= {