# ⑰チャレンジしよう！の解答例

    color(0) //透明
    for i in 1...3 {
    for j in 1...4-i {
    drop(i)
    drop(11-i)
    }
    }
    color(1) //赤
    for i in 1...10 {
    drop(i)
    }
    color(0) //透明
    for i in 2...9 {
        for j in 1...4-count(i)
        {
            drop(i)
        }
    }
    for i in 1...10 {
        for j in 1...3 {
            color(0) //透明
            if (i==1){
                color(1) //赤
            }
            if (i==10) {
                color(1) //赤
            }
            drop(i)
        }
    }
    color(0) //透明
    for i in 3...8 {
        drop(i)
    }
    for i in 4...7 {
        drop(i)
    }
    color(1) //赤
    for i in 2...9 {
        drop(i)
    }

戻る