26
1
Today while playing with my kids I noticed that an apparently simple toy in the park hid a challenge.
The wheel has a triangle that points to a number, but also has three circles that point to the numbers every 90 degrees from the first one. So:
Challenge (really simple)
Given an integer between 1 and 12 (the one pointed by the triangle) in any acceptable form, output also in any acceptable form and order the three numbers pointed by the circles (the ones every 90 degrees).
Test cases
In Out
1 4, 7, 10
2 5, 8, 11
3 6, 9, 12
4 7, 10, 1
5 8, 11, 2
6 9, 12, 3
7 10, 1, 4
8 11, 2, 5
9 12, 3, 6
10 1, 4, 7
11 2, 5, 8
12 3, 6, 9
This is code-golf, so may the shortest code for every language win!
May we take the input as 0-indexed? Like,
0 -> 4, 7, 10
? – Mr. Xcoder – 2017-12-29T21:20:04.2538@Mr.Xcoder sorry, this time I'm going to say no. – Charlie – 2017-12-29T21:26:37.580
3Is this the fourth challenge now based on some activity involving your kids? :P – FlipTack – 2017-12-29T21:58:12.407
3@FlipTack Perhaps we need an inspired-by-kids tag ;) – Steadybox – 2017-12-29T22:13:31.500
6@FlipTack I've lost count. :-) But given that I spent most of my free time with my kids, guess where does my inspiration come from... – Charlie – 2017-12-29T22:17:05.080
@Steadybox That would be a meta tag, which is BAD. But yes, we do. (Perhaps a meta question with links would suffice?) – wizzwizz4 – 2018-01-01T10:32:56.533