Libraryless. Click here for Pure Java version (2008L/14K/44K).
1 | !759 |
2 | |
3 | p { |
4 | Case c = ioioiParse("#1003022"); |
5 | |
6 | S[] e1 = first(c.stringExamples()); |
7 | F<S, S> pat = makePattern(str(process(e1[0])), e1[1]); |
8 | |
9 | for (S[] e : c.stringExamples()) |
10 | if (!ioSmartEqVerbose(e[1], pat.get(str(process(e[0]))))) |
11 | fail("nope"); |
12 | print("yo! solved this."); |
13 | } |
14 | |
15 | static int process(S in) { |
16 | ret count(javaTok(in), ",") + 1; |
17 | } |
18 | |
19 | static F<S, S> makePattern(S in, S out) { |
20 | ret new F<S, S>() { |
21 | S get(S in) { |
22 | ret in + " items"; // TODO |
23 | } |
24 | }; |
25 | } |
Began life as a copy of #1003024
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003032 |
Snippet name: | Solve "how long is this list" |
Eternal ID of this version: | #1003032/1 |
Text MD5: | 30abceaf6f4a66fe47e92d4567560bf5 |
Transpilation MD5: | 94101422c184decd57430b122dfbc066 |
Author: | stefan |
Category: | javax / nl |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-04-21 17:22:24 |
Source code size: | 509 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 722 / 757 |
Referenced in: | [show references] |