Rank | User | Size | Date | Code |
1 | Juju | 80 | 7/23/2014 12:39:40 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | Runer112 | 32 | 7/27/2014 12:27:24 PM | Spoiler For Spoiler: |
2 | JWinslow23 | 60 | 7/22/2014 1:02:09 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | Jens_K | 113 (copy input to clipboard) | 7/23/2014 9:15:32 AM | Spoiler For Spoiler: |
2 | LDStudios | 162 | 7/23/2014 3:30:25 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | willrandship | 83 | 7/22/2014 3:08:29 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | Runer112 | 174 | 7/27/2014 12:27:24 PM | Spoiler For Spoiler: |
2 | 3298 | 178 | 7/27/2014 1:58:00 PM | Spoiler For Spoiler: |
3 | ben_g | 198 | 7/22/2014 4:01:06 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | Runer112 | 27 | 7/27/2014 12:27:24 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | 3298 | 159 | 7/27/2014 1:58:00 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | 3298 | 138 | 7/27/2014 1:58:00 PM | Spoiler For Spoiler: |
Rank | User | Size | Date | Code |
1 | 3298 | 79 | 7/27/2014 1:58:00 PM | Spoiler For Spoiler: |
Rank | Lang | User | Size | Date |
1 | CJam | Runer112 | 27 | 7/27/2014 12:27:24 PM |
2 | Golfscript | Runer112 | 32 | 7/27/2014 12:27:24 PM |
3 | SysRPL | 3298 | 79 | 7/27/2014 1:58:00 PM |
4 | Ruby 2 | Juju | 80 | 7/23/2014 12:39:40 PM |
5 | Python3 | willrandship | 83 | 7/22/2014 3:08:29 PM |
6 | Nspire Lua | Jens_K | 113 (copy input to clipboard) | 7/23/2014 9:15:32 AM |
7 | Haskell | 3298 | 138 | 7/27/2014 1:58:00 PM |
8 | XTend | 3298 | 159 | 7/27/2014 1:58:00 PM |
9 | Java | Runer112 | 174 | 7/27/2014 1:58:00 PM |
Aha, down to 80 bytes! Try to beat me :P60 in Golfscript. :P
Can we get some official clarification on input format, JWinslow23/willrandship? The main questions that come to mind are:Well, if you use regular expressions, now you got TWO problems. :P
- Are words/clusters composed of alphanumeric characters, any printable characters, or something in between?
- Are leading, trailing, or duplicated (successive) spaces valid?
A good way to solidify all of these rules at once could be to specify a regular expression for valid input.
Words are made up of any printable characters except for the space. Trailing, leading, and repeating spaces are valid, but shall be deleted so there is only one space between words upon output.
I kind of prefer the one words include those beginning with numbers, as stated in the examples in the OP. Either way, if numbers include alphanumeric characters after them as Runer said, my entry would be even more golfed and I would save about 12 characters. But I don't care.Words are made up of any printable characters except for the space. Trailing, leading, and repeating spaces are valid, but shall be deleted so there is only one space between words upon output.
Are we sure this is the official ruling? Because when I asked willrandship his thoughts in IRC yesterday, he gave basically the opposite answers; words made up of alphanumeric characters only, and no trailing, leading, or repeating spaces. I personally prefer willrandship's view, because it gives a better chance to languages that don't have string splitting/regex functions and generally allows for more golfed/hacky solutions.
Thanks for the welcome messages! I have written a few posts on the UCF and the recently closed DCF in the last few years, and I saw some of DJ's old posts on the UCF. And before the CasioScene drama happened I was a registered user at CasioKingdom. The restore to an old backup over there removed all evidence of that, but I won't go back there because it's become a toyland for spambots.Yeah I wish that CK forums owners added more anti-spams on the site after the restoral. It was old but it had lots of useful info. I guess for Omni the permissions were messed up in the upgrade we also had a few months ago. Admins will probably re-instate the post limit if more bots come in here, but let's hope the bots won't do so.
The permissions seem a bit screwed up, because I tried the test message you suggested, and it actually worked. I understand why this limit is in place (look at CasioKingdom to see what happens without such protection), and I think someone should enforce what that post in the news section says. I can only assume this no-PM rule has been softened, because I had to solve a captcha like at my registration. (Not a problem for a human, though.)
So with the PM way apparently working, I'll use it.
Here's my suggestion for the next challenge:
Input: a positive integer of reasonable size
Output: The highest prime factor of that integer, in binary, but with all 0s replaced with underscores (_) and all 1s replaced with minus signs (-)
Example:
Input: 15
Output: -_-
Example:
Input: 7
Output: ---
Example:
Input: 115
Output: -_---
I don't think there are underscores in TI BASIC, but I'll try if you win
:Input Str1
:DelVar CDelVar X" →Str2
:Repeat not(B
:X+1→X
:0→M
:For(N,1,X
:Ans+1→A
:inString(Str1," ",Ans→B
:End
:If not(Ans
:1+length(Str1
:sub(Str1,A,Ans-A
:For(L,1,length(Ans
:If inString("0123456789",sub(Ans,L,1
:IS>(M,M
:
:End
:If M=length(Ans
:Then
:C+expr(Ans→C
:Else
:Ans+" "+Str2→Str2
:End
:End
:ClrHome
:Output(1,1,Str2
:length(Str2)/16
:Output(int(Ans)+not(int(Ans)),16fPart(Ans)+16not(fPart(Ans)),C
Looking over the solutions, I noticed that the shortest Java version does not process one string, but instead assumes someone has split it alreadyThat's because java automatically splits the input, as long as the input string is not surrounded by quotes.
class C{public static void main(String[] a){String s="";int i=0;for(String t:a){try{i+=Integer.parseInt(t);}catch(Exception e){s=t+" "+s;}}s+=i;System.out.println(s);}}
String[] a
Drop the space, 1 byte saved.for(String t:a){...}
Drop the curly braces, 2 more bytes down (I just saw that in my submission as well). Your other solution already has that.s+=i;System.out.println(s);
Two things here: Drop the ln (like in your submission), 2 bytes saved. The concatenation of string and number can be done inside the parentheses of the print, saving 3 more bytes.