设丁丁有x颗,宁宁有y颗
x+y=270
25%x+y=120%y=》5x=4y x=4y/5
代入得
4y/5+y=270
9y/5=270
y=150
x=120
所以
顶顶有120颗,宁宁有150颗.