Subdomain Posts
C# | 478 days ago
None | 494 days ago
None | 494 days ago
Lisp | 510 days ago
None | 513 days ago
Python | 515 days ago
Lisp | 515 days ago
Lisp | 515 days ago
None | 548 days ago
None | 582 days ago
Recent Posts
None | 3 sec ago
Diff | 11 sec ago
C++ | 16 sec ago
C++ | 26 sec ago
C | 34 sec ago
Java | 36 sec ago
JavaScript | 40 sec ago
None | 2 min ago
None | 2 min ago
Python | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By xvedejas on the 28th of Nov 2008 08:27:42 PM Download | Raw | Embed | Report
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace duplicates
  5. {
  6.         class MainClass
  7.         {
  8.                 public static void Main(string[] args)
  9.                 {
  10.                         int max = 10000;
  11.                         List<int> numbers = new List<int>();
  12.                        
  13.                         for ( int i = 0; i < max; i++ )
  14.                         {
  15.                                 bool pass = true;
  16.                                 foreach ( char character in i.ToString() )
  17.                                 {
  18.                                         if ( i.ToString().IndexOf( character ) != i.ToString().LastIndexOf( character ) )
  19.                                         {
  20.                                                 pass = false;
  21.                                         }
  22.                                 }
  23.                                 if ( pass ) { numbers.Add( i ); }
  24.                         }
  25.                        
  26.                         foreach ( int number in numbers ) {     Console.WriteLine( number ); }
  27.                 }
  28.         }
  29. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: