Advertisement
leenade_fkey

Untitled

Jun 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. namespace Rextester
  7. {
  8. public class Program
  9. {
  10. public static void Main(string[] args)
  11. {
  12. int result = 0;
  13. for(int i = 10; i < 10000; i++)
  14. {
  15. if (i.ToString().Any(u => i.ToString().IndexOf(u) != i.ToString().LastIndexOf(u)))
  16. result += i;
  17. }
  18. Console.WriteLine(result);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement