Skip to main content
Corrected to follow rules
Source Link

Haskell, 4157 Bytes

Solution

import Data.List
unlines.nub.map(filter(/='2').show).$[1..]100]

or

import Data.List
nub.map(filter(/='2').show)$[1..]100]

if you just want the list.

ExampleOutput

Prelude Data.List> unlines.nub.map(filter(/='2').show)$[1..]
"1\n\n3\n4\n5\n6\n7\n8\n9\n10\n11\n13\n14\n15\n16\n17\n18\n19\n0\n30\n31\n33\n34\n35\n36\n37\n38\n39\n40\n41\n43\n44\n45\n46\n47\n48\n49\n50\n51\n53\n54\n55\n56\n57\n58\n59\n60\n61\n63\n64\n65\n66\n67\n68\n69\n70\n71\n73\n74\n75\n76\n77\n78\n79\n80\n81\n83\n84\n85\n86\n87\n88\n89\n90\n91\n93\n94\n95\n96\n97\n98\n99\n100\n101\n103\n104\n105\n106\n107\n108\n109\n110\n111\n113\n114\n115\n116\n117\n118\n119\n130\n131\n133\n134\n135\n136\n137\n138\n139\n140\n141\n143\n144\n145\n146\n147\n148\n149\n150\n151\n153\n154\n155\n156\n157\n158\n159\n160\n161\n163\n164\n165\n166\n167\n168\n169\n170\n171\n173\n174\n175\n176\n177\n178\n179\n180\n181\n183\n184\n185\n186\n187\n188\n189\n190\n191\n193\n194\n195\n196\n197\n198\n199\n00\n01\n03\n04\n05\n06\n07\n08\n09\n300\n301\n"1\n\n3\n4\n5\n6\n7\n8\n9\n10\n11\n13\n14\n15\n16\n17\n18\n19\n0\n30\n31\n33\n34\n35\n36\n37\n38\n39\n40\n41\n43\n44\n45\n46\n47\n48\n49\n50\n51\n53\n54\n55\n56\n57\n58\n59\n60\n61\n63\n64\n65\n66\n67\n68\n69\n70\n71\n73\n74\n75\n76\n77\n78\n79\n80\n81\n83\n84\n85\n86\n87\n88\n89\n90\n91\n93\n94\n95\n96\n97\n98\n99\n100

Explanation

Makes all numbers a string, removes their '2's and weeds out the duplicates.

Haskell, 41 Bytes

Solution

unlines.nub.map(filter(/='2').show)$[1..]

or

nub.map(filter(/='2').show)$[1..]

if you just want the list.

Example

Prelude Data.List> unlines.nub.map(filter(/='2').show)$[1..]
"1\n\n3\n4\n5\n6\n7\n8\n9\n10\n11\n13\n14\n15\n16\n17\n18\n19\n0\n30\n31\n33\n34\n35\n36\n37\n38\n39\n40\n41\n43\n44\n45\n46\n47\n48\n49\n50\n51\n53\n54\n55\n56\n57\n58\n59\n60\n61\n63\n64\n65\n66\n67\n68\n69\n70\n71\n73\n74\n75\n76\n77\n78\n79\n80\n81\n83\n84\n85\n86\n87\n88\n89\n90\n91\n93\n94\n95\n96\n97\n98\n99\n100\n101\n103\n104\n105\n106\n107\n108\n109\n110\n111\n113\n114\n115\n116\n117\n118\n119\n130\n131\n133\n134\n135\n136\n137\n138\n139\n140\n141\n143\n144\n145\n146\n147\n148\n149\n150\n151\n153\n154\n155\n156\n157\n158\n159\n160\n161\n163\n164\n165\n166\n167\n168\n169\n170\n171\n173\n174\n175\n176\n177\n178\n179\n180\n181\n183\n184\n185\n186\n187\n188\n189\n190\n191\n193\n194\n195\n196\n197\n198\n199\n00\n01\n03\n04\n05\n06\n07\n08\n09\n300\n301\n

Explanation

Makes all numbers a string, removes their '2's and weeds out the duplicates.

Haskell, 57 Bytes

Solution

import Data.List
unlines.nub.map(filter(/='2').show).$[1..100]

or

import Data.List
nub.map(filter(/='2').show)$[1..100]

if you just want the list.

Output

Prelude Data.List> unlines.nub.map(filter(/='2').show)$[1..]
"1\n\n3\n4\n5\n6\n7\n8\n9\n10\n11\n13\n14\n15\n16\n17\n18\n19\n0\n30\n31\n33\n34\n35\n36\n37\n38\n39\n40\n41\n43\n44\n45\n46\n47\n48\n49\n50\n51\n53\n54\n55\n56\n57\n58\n59\n60\n61\n63\n64\n65\n66\n67\n68\n69\n70\n71\n73\n74\n75\n76\n77\n78\n79\n80\n81\n83\n84\n85\n86\n87\n88\n89\n90\n91\n93\n94\n95\n96\n97\n98\n99\n100

Explanation

Makes all numbers a string, removes their '2's and weeds out the duplicates.

Source Link

Haskell, 41 Bytes

Solution

unlines.nub.map(filter(/='2').show)$[1..]

or

nub.map(filter(/='2').show)$[1..]

if you just want the list.

Example

Prelude Data.List> unlines.nub.map(filter(/='2').show)$[1..]
"1\n\n3\n4\n5\n6\n7\n8\n9\n10\n11\n13\n14\n15\n16\n17\n18\n19\n0\n30\n31\n33\n34\n35\n36\n37\n38\n39\n40\n41\n43\n44\n45\n46\n47\n48\n49\n50\n51\n53\n54\n55\n56\n57\n58\n59\n60\n61\n63\n64\n65\n66\n67\n68\n69\n70\n71\n73\n74\n75\n76\n77\n78\n79\n80\n81\n83\n84\n85\n86\n87\n88\n89\n90\n91\n93\n94\n95\n96\n97\n98\n99\n100\n101\n103\n104\n105\n106\n107\n108\n109\n110\n111\n113\n114\n115\n116\n117\n118\n119\n130\n131\n133\n134\n135\n136\n137\n138\n139\n140\n141\n143\n144\n145\n146\n147\n148\n149\n150\n151\n153\n154\n155\n156\n157\n158\n159\n160\n161\n163\n164\n165\n166\n167\n168\n169\n170\n171\n173\n174\n175\n176\n177\n178\n179\n180\n181\n183\n184\n185\n186\n187\n188\n189\n190\n191\n193\n194\n195\n196\n197\n198\n199\n00\n01\n03\n04\n05\n06\n07\n08\n09\n300\n301\n

Explanation

Makes all numbers a string, removes their '2's and weeds out the duplicates.