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  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: #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: 663 / 703
Referenced in: [show references]