Advertisement
Guest User

Code Golf - The Reboot #5 - Winners

a guest
Jul 5th, 2015
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. JWinslow23 40 Golfscript HowshouldIknowthetimethisisn'tanentry
  2.  
  3. .~:N;{48-}/]{.{+}*\(;\[]++.)\;N<}do)\;N=
  4.  
  5. lirtosiast 43 TI-BASIC Jul 01 2015 02:25:25 pm
  6.  
  7. Input N
  8. int(10fPart(N10^(seq(A,A,~14,~1
  9. While N≠max(Ans
  10. augment(Ans,{sum(Ans,dim(Ans)-int(log(N
  11. End
  12.  
  13. PT_ 43 TI-BASIC Jul 02 2015 01:24:20 pm
  14.  
  15. Input N
  16. int(10fPart(N10^(seq(A-1,A,~int(log(N)),0
  17. While N!=sum(Ans
  18. DeltaList(cumSum(augment(Ans,{sum(Ans
  19. End
  20.  
  21. Cumred_Snektron 83 Python Jul 01 2015 10:37:07 am
  22.  
  23. n=input();l=map(int,str(n))
  24. while l[-1]<n:l=l[1:]+l[:1];l[-1]=sum(l)
  25. print l[-1]==n
  26.  
  27. mr womp womp 97 TI-BASIC Jun 30 2015 09:13:00 pm
  28.  
  29. Input Str1
  30. expr(Str1->B
  31. {expr(sub(Str1,1,1->L2
  32. For(A,2,length(Str1
  33. augment(L2,{expr(sub(Str1,A,1->L2
  34. End
  35. Repeat E>B
  36. sum(L2->E
  37. If E=B:Disp 1
  38. DeltaList(cumSum(L2->L2
  39. augment(L2,{E->L2
  40. End
  41.  
  42. Adriweb 112 Javascript Jun 30 2015 02:06:20 am
  43.  
  44. function K(a){t=(""+a).split("");l=t.length;for(s=o=0;a>s;t.push(s),o++)for(i=s=0;l>i;)s+=+t[i+++o];return s==a}
  45.  
  46. Juju 150 Ruby Jun 30 2015 04:57:53 pm
  47.  
  48. n=ARGV[0]
  49. d=n.split("")
  50. n=n.to_i
  51. l=d.count
  52. (0...l).each{|a|d[a]=d[a].to_i}
  53. i=l-1
  54. while d[i]<n do
  55. i+=1
  56. d[i]=0
  57. (1..l).each{|j|d[i]+=d[i-j]}end
  58. p d[i]==n
  59.  
  60. Adriweb 152 Lua Jun 30 2015 02:06:20 am
  61.  
  62. function K(c)s=""..c;l=#s;t={}for d=1,l do t[#t+1]=s:sub(d,d)end;a=0;b=0;while a<c do a=0;for d=1,l do a=a+t[d+b]end;t[#t+1]=a;b=b+1 end;return a==c end
  63.  
  64. c4ooo 190 Java Jul 01 2015 12:32:49 pm
  65.  
  66. void k(int a){int l=(a+"").length(),q=0,e=10;int[]i=new int[l];for(;q<l;q++)i[q]=(int)(a/Math.pow(e,l-q-1)%e);while(e<a){e=0;for(int w:i)e+=w;System.arraycopy(i,1,i,0,l-1);i[l-1]=e;q/=e-a;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement