>>265
まだまだ途中
そもそも台数を出すのであれば重さを設定する必要はない
static int weight → static int weight=0 って変えて
weight=g → weight++ って変えてみな