寫(xiě)程序無(wú)聊,玩?zhèn)€游戲,從1開(kāi)始喊數(shù),數(shù)到含7或者是7的倍數(shù)的要拍鍵盤(pán)!
那么問(wèn)題來(lái)了,請(qǐng)你:
輸出7和7的倍數(shù),還有包含7的數(shù)字例如(17,27,37...70,71,72,73...)
一個(gè)整數(shù)N。(N不大于30000)
統(tǒng)計(jì)出不大于N的與7有關(guān)的數(shù)字的個(gè)數(shù)。如20以內(nèi)與7有關(guān)的數(shù)為7、14、17共3個(gè)。
20
3
1223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,20801223,1245,1286,1363,1434,1554,1624,2080