Answer by The Thonnu for Calculate the difficulty of a Code Golf question
Thunno 2, 10 bytes/70/ṃ'*T×ɱTry it online!Explanation/70/ṃ'*T×ɱ'# Implicit input/ # Divide v by a 70/ # Divide this by 70ṃ # Take the ceiling'*T×'# Push 10 asterisksɱ # Take that many characters #...
View ArticleAnswer by Wasif for Calculate the difficulty of a Code Golf question
Vyxal, 9 bytes/70/ṙ›\**Try it Online!
View ArticleAnswer by caird coinheringaahin g for Calculate the difficulty of a Code Golf...
Jelly, 10 bytes÷÷70Ċ«⁵”*xTry it online!How it works÷÷70Ċ«⁵”*x - Main link. Takes v on the left and a on the right÷ - v ÷ a÷70 - v ÷ a ÷ 70Ċ - ⌈v ÷ a ÷ 70⌉«⁵ - min(⌈v ÷ a ÷ 70⌉, 10)”*x - Repeat "*"...
View ArticleAnswer by caird coinheringaahin g for Calculate the difficulty of a Code Golf...
Add++, 17 bytesL^,/70/i9b<"*"$ypTry it online!Not often I get to use the ^ flag in code-golfHow it worksL^, ; Create a lambda that returns the stack joined ; Example arguments: [3067 15] / ; Divide;...
View ArticleAnswer by smls for Calculate the difficulty of a Code Golf question
Perl 6: 32 bytesAs a lambda that takes two arguments:{"*"x min 10,ceiling $^x/$^y/70}
View ArticleAnswer by Luis Masuelli for Calculate the difficulty of a Code Golf question
Ruby, 27 bytes->v,a{(?**10)[1..(v/a/70)]}
View ArticleAnswer by Anastasiya-Romanova 秀 for Calculate the difficulty of a Code Golf...
EXCEL, 29 bytesIf you count Excel as a representation of VBA Excel, then you can use=REPT("*",MIN(1+v/(70*a),10))where v and a are the name of reference cells.
View ArticleAnswer by Timtech for Calculate the difficulty of a Code Golf question
TI-Basic, 39 bytesPrompt V,Asub("**********",1,max(0,min(10,int(V/A/70)+1
View ArticleAnswer by Ephi for Calculate the difficulty of a Code Golf question
Ruby, 47 35 bytesf=->(v,a){'*'*((v/=a*70)<9?v+1:10)}Called with f.call(v,a)Saved 12 bytes thanks to user3334690, now the function implicitly returns the result.
View ArticleAnswer by Samsquanch for Calculate the difficulty of a Code Golf question
PHP 5.6, 66 bytesfunction a($v,$a){echo str_repeat('*',max(0,min(10,1+$v/$a/70)));}First we simplify the equation to v/a/70. From there we add 1 since PHP will use this number as an integer for the...
View ArticleAnswer by user45941 for Calculate the difficulty of a Code Golf question
Actually, 14 bytes:70a\\u9ukm'**Try it online!Takes advantage of the fact that 0 views and 0 answers is impossible, and thus ceil(v/a) > 0.Explanation::70a\\u9ukm'**:70 push 70 ([70 a v]) a invert...
View ArticleAnswer by Stefano Sanfilippo for Calculate the difficulty of a Code Golf...
C, 54, 51, 50, 49 bytesAssuming that v is positive or zero and a positive, the x < min clamping case is never met, since there is no way the result of the ceiling operation can be negative....
View ArticleAnswer by MarLinn for Calculate the difficulty of a Code Golf question
Haskell, 35 bytesThis solution is as completely different from Laikonis answer as it gets for something this trivial. Yet the score (for now) is exactly the...
View ArticleAnswer by Neil for Calculate the difficulty of a Code Golf question
Batch, 81 bytes@set/an=(700*%2-%1)/%2/70,n*=!(n^>^>31)@set s=**********@call echo %%s:~%n%%%Port of my JavaScript answer, except that Batch uses integer arithmetic, so I wrote the formula as...
View ArticleAnswer by Blue for Calculate the difficulty of a Code Golf question
Pyke, 13 9 bytes/70/\**T<Try it here!Explanation:/ - num_1 / num_2 70/ - ^ / 70 \** - "*" * ^ T< - ^[:10]
View ArticleAnswer by Beta Decay for Calculate the difficulty of a Code Golf question
Fourier, 46 bytesAll division in Fourier is integer division, so I just add one after division.I*10/I/700^~X<0{1}{0~X}X>10{1}{10~X}X(42ai^~i)Try it online!
View ArticleAnswer by Yay295 for Calculate the difficulty of a Code Golf question
I've been wanting to do this for a while...HTML + CSS 491487 485 bytes-4 bytes thanks to Conor O'Brien-2 bytes thanks to Releasing Helium NucleiInput is taken as the width and height of the page...
View ArticleAnswer by Program man for Calculate the difficulty of a Code Golf question
m4, 136 135 bytesdefine(r,`ifelse($1,0,,eval($1>9),1,*`r(9)',*`r(decr($1))')')define(f,`r(ifelse(eval($1%($2*70)),0,eval($1/$2/70),eval($1/$2/70+1)))')Defines a macro f which takes v and a, and...
View ArticleAnswer by NonlinearFruit for Calculate the difficulty of a Code Golf question
Java 8, 57 bytesUses a lambda to save bytes, performs the calculation and substrings to return the answer. (v,a)->"**********".substring(Math.max(0,(700*a-v)/70/a))Here is my class for testing...
View ArticleAnswer by Delioth for Calculate the difficulty of a Code Golf question
dc, 110 108 104 98 bytesThis was a doozy since slicing isn't a thing. Also, dc doesn't manipulate strings. I just really was waiting for a string one that would be < 5 hours of coding. On the plus...
View Article
More Pages to Explore .....