Skip to main content
Commonmark migration
Source Link

#C#, 27591 bytes cracked!

C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

#C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#C#, 27591 bytes cracked!cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

#C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

#C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3
added 74 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

#C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

#C#, 27591 bytes

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3

#C#, 27591 bytes cracked!

static void Main(){int n=int.Parse(System.Console.ReadLine()),v=30*"
    ...between the quotes is a total of 27387 '[' characters...
".Length,c=0,p=0,f,j;while(c<n){j=0;j++;f=0;while(j<v){if(p%j==0)f++;j++;}f--;f--;if(f==0)System.Console.WriteLine(p);if(f==0)c++;p++;}}

30 * 27387 = 821610. The 2^16-1th prime (the specified limit) is 821603, this code checks to see if there are exactly 2 factors in the range [1, 821609] until n primes have been written to the console.

Test it on ideone

Character set:

' ' :3     '"' :2     '%' :1     '(' :9     ')' :9
'*' :1     '+' :10    ',' :5     '-' :4     '.' :6
'0' :8     '3' :1     ';' :11    '<' :2     '=' :12
'C' :2     'L' :3     'M' :1     'P' :1     'R' :1
'S' :2     'W' :1     '[' :27387 'a' :4     'c' :4
'd' :2     'e' :12    'f' :10    'g' :1     'h' :3
'i' :13    'j' :6     'l' :4     'm' :2     'n' :10
'o' :5     'p' :4     'r' :2     's' :6     't' :8
'v' :3     'w' :2     'y' :2     '{' :3     '}' :3
added 14 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282
Loading
deleted 4 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282
Loading
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282
Loading