Anonymous user
Positive decimal integers with the digit 1 occurring exactly twice: Difference between revisions
Positive decimal integers with the digit 1 occurring exactly twice (view source)
Revision as of 12:24, 30 April 2022
, 2 years ago+add Pike
m (Removed duplicate </pre> from F# entry) |
(+add Pike) |
||
Line 454:
191 211 311 411 511 611 711 811 911
</pre>
=={{header|Pike}}==
<lang Pike>int main() {
int limit = 1000;
for(int i = 0; i < limit + 1; i++) {
if(String.count((string)i, "1") == 2) {
write((string)i + " ");
}
}
write("\n");
return 0;
}</lang>
{{out}}
<pre>11 101 110 112 113 114 115 116 117 118 119 121 131 141 151 161 171 181 191 211 311 411 511 611 711 811 911</pre>
=={{header|Python}}==
|