Advertisement
Ichabod2032

SE_CodeGolf_42536

Dec 21st, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. int[] A(int n)
  2. {
  3.     int m = n, i, c = 0,l = (int)((n / 2f) * (n + 1));
  4.     var a = new int[l];
  5.     while (m-- > 0)
  6.         for (i = m; i++ < n; )
  7.             a[c++] = i;
  8.     return a;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement