Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Van-Eck-sequence/C-sharp/van-eck-sequence.cs
Normal file
7
Task/Van-Eck-sequence/C-sharp/van-eck-sequence.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
using System.Linq; class Program { static void Main() {
|
||||
int a, b, c, d, e, f, g; int[] h = new int[g = 1000];
|
||||
for (a = 0, b = 1, c = 2; c < g; a = b, b = c++)
|
||||
for (d = a, e = b - d, f = h[b]; e <= b; e++)
|
||||
if (f == h[d--]) { h[c] = e; break; }
|
||||
void sho(int i) { System.Console.WriteLine(string.Join(" ",
|
||||
h.Skip(i).Take(10))); } sho(0); sho(990); } }
|
||||
Loading…
Add table
Add a link
Reference in a new issue