Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1003024 - Solve "how many items in this list"

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2064L/15K/45K).

!752

p {
  Case c = ioioiParse("#1003029");
  //print("Got " + l(c.examples) + " examples");
  
  for (S[] e : (L<S[]>) (L) c.examples)
    if (!ioSmartEq(e[1], process(e[0])))
      fail("nope");
  commentSnippet(c.id, "yo! solved this.");
}

static int process(S in) {
  ret count(javaTok(in), ",") + 1;
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1003024
Snippet name: Solve "how many items in this list"
Eternal ID of this version: #1003024/1
Text MD5: dfaedadd8a6b49c477a13f0edf83a13e
Transpilation MD5: 2e5ff1a8cb8875e75437f3af81a56e78
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 18:55:04
Source code size: 322 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 389 / 363
Referenced in: [show references]

Formerly at http://tinybrain.de/1003024 & http://1003024.tinybrain.de