0 Members and 2 Guests are viewing this topic.
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.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 sizeOutput: 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: 15Output: -_-Example:Input: 7Output: ---Example:Input: 115Output: -_---
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 already
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
for(String t:a){...}
s+=i;System.out.println(s);