| Author | Dave Jarvis <email> |
|---|---|
| Date | 2014-09-18 13:13:34 GMT-0700 |
| Commit | d04f83dd7192039d859ec418ba5a2314b999053d |
| Parent | 3b063c9 |
| -public class Adjacency { | ||
| - /** | ||
| - * Shifts the index for even numbers by 4. | ||
| - */ | ||
| - public static int d( int n, int t ) { | ||
| - return ((n+4) % (t + t%2)) * (1-(n%2)) + (n%2 * n); | ||
| - } | ||
| - | ||
| - public static void main( String args[] ) { | ||
| - int t = 5; | ||
| - for( int i = 1; i <= t; i++ ) { | ||
| - System.out.printf( "%d\n", d(i, t) ); | ||
| - //System.out.printf( "d(%02d) = %d\n", i, d(i, t) ); | ||
| - } | ||
| - } | ||
| -} | ||
| - | ||
| Delta | 0 lines added, 17 lines removed, 17-line decrease |
|---|