title: Print a bunch of uninteresting numbers!

text:
# Question
Title: Print a bunch of uninteresting numbers!
An *uninteresting number* (which I totally didn't make up only for this challenge) is created like this:

> 1. Take a positive integer N
> 2. Create a new number O by adding the digits of N at the end of N
> 3. The final uninteresting number is O\*N

For example for N=12:

> 1. O = 1212
> 2. O\*N = 1212 * 12
> 3. Final number is 14544

# Input

A positive integer N (N \> 0) or your language's equivalent. You don't have to catch incorrect input.

# Output

The corresponding uninteresting number.

# Test cases

```
  1 -> 11
  2 -> 44
  3 -> 99
 10 -> 10100
174 -> 30306276

```

# Scoring

Shortest Code in Bytes wins.

# Answer
## 05AB1E, 3 bytes

```
Ð«*

```

**Explained**

```
Ð    # triplicate input
 «   # conactenate
  *  # multiply

```

Try it online
> 39 votes

# Answer
## JavaScript (ES6), 10 bytes

```
_=>(_+_)*_

```

Needs to be called with the argument as a `String`, not a `Number`.

### Usage:

```
(_=>(_+_)*_)('3')
99

```

-3 bytes thanks to @Quill's suggestion.
> 30 votes

# Answer
# Java 8, ~~29 26 25~~ 21 Bytes

God bless lambda

```
c->new Long(c+""+c)*c

```

~~c-\>Long.decode(c+""+c)\*c;~~
> 26 votes

# Answer
## vim, 11

```
C<C-r>=<C-r>"<C-r>"*<C-r>"<cr>

```

crcrcrcrcr...

```
C       change (delete and enter insert mode) until the end of the line
<C-r>=  insert an expression via the special "expression register"
<C-r>"  insert the contents of the default register (what we just C'd)
<C-r>"  ... again
*       multiplied by
<C-r>"  the input (again)
<cr>    insert the result of this expression

```
> 20 votes

# Answer
# Pyth, ~~5~~ 4 bytes

```
*s+`

```

Explanation:

```
    Q    input
   `     representation, basically str(Q)
  +  Q   add Q to its own string form
 s       parse int
*     Q  multiply by input
         print

```

Test it here.
> 16 votes

# Answer
# Emacs, 17 bytes

`(``*``SPACE``C-SPACE``C-E``M-Y``SPACE``C-Y``C-Y``)``C-J`

### Explanation

* `(``*``SPACE` adds `(*`  at point (before the number);
* `C-SPACE``C-E``M-Y` Select and copy the number;
* `SPACE` adds a space character at point (after the number);
* `C-Y``C-Y` pastes two times the number at point;
* `)` adds `)` at the end;
* `C-J` interprets the line as a LISP expression and prints its result.

### Exemple

Cursor represented by a pipe (`|`)

* `|174`
* `(``*``SPACE` `(* |174`
* `C-SPACE``C-E``M-Y` `(* 174|`
* `SPACE` `(* 174 |`
* `C-Y``C-Y` `(* 174 174174|`
* `)` `(* 174 174174)|`
* `C-J`

### Result

```
(* 174 174174)
30306276|

```
> 15 votes

# Answer
# Python 2.7, 21 bytes:

```
lambda f:int(`f`*2)*f

```

Well, this has to be the shortest Python answer I have ever written in the shortest amount of time ever. It's an anonymous lambda function that can be executed by naming it anything you want and then calling it like a normal function wrapped in `print()`. For instance, if your input is `12`, and the function was named `H`, this this would be called like `print(H(12))`.

Try It Online! (Ideone)

Note that this only works for values up and equal to `9223372036854775807` since any higher value and `repr()` puts a `L` at the end of the integer. Therefore, for values greater than `9223372036854775807`, this **24 byte** version would be the one that works:

```
lambda f:int(str(f)*2)*f

```

Try This Online! (Ideone)
> 14 votes

# Answer
# C#, 19 23 bytes

```
n=>int.Parse(""+n+n)*n;

```

# Without strings, 47 bytes

```
n=>{int i=1;while(i<=n)i*=10;return(i+1)*n*n;};

```
> 12 votes

# Answer
## Jelly, 4 Bytes

```
;DḌ×

```

Try it online

## Explanation

```
;DḌ×    Main link. argument : N

 D      Decimal; Yield the digits of N
;       Concatenate N and its digits
  Ḍ     Convert to integer; We get O
   ×    Multiply O and N

```
> 11 votes

# Answer
# J, 7 bytes

```
*,~&.":

```

## Explanation

```
*,~&.":  Input: n
     ":  Format n as a string
 ,~&.    Reflect and join the string to make "nn"
         and parse the string to get a number
*        Multiply that number by n

```
> 10 votes

# Answer
# C, ~~70~~ ~~68~~ ~~54~~ ~~53~~ ~~52~~ 44

```
f(n){return(pow(10,(int)log10(n)+1)*n+n)*n;}

```

Previous version (48 bytes, no math functions), saved 16 bytes thanks to @LeakyNun, 1 byte thanks to @FryAmTheEggman, 4 bytes thanks to @TobySpeight:

```
f(n,d,i){for(i=d=n;d;d/=10)i*=10;return(i+n)*n;}

```

Call `f()` with one argument, the number, and it returns the corresponding uninteresting number.

## Test program

```
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    while (*++argv) {
        int n = atoi(*argv);
        printf("%d -> %d\n", n, f(n));
    }
    return 0;
}

```

## Test results:

```
$ ./84712 1 2 3 4 10 174
1 -> 11
2 -> 44
3 -> 99
4 -> 176
10 -> 10100
174 -> 30306276

```

Try it online!
> 10 votes

# Answer
# CJam, 8 bytes

```
ri_`_+i*

```

**Try it online!**

```
r     e# Read input
i     e# Convert to integer
_     e# Duplicate
`     e# Convert to string
_     e# Duplicate
+     e# Concatenate
i     e# Convert to integer
*     e# Multiply. Implicitly display

```
> 9 votes

# Answer
# Dyalog APL, 7 bytes

```
⊢×#⍎⍕,⍕

```

string representation

`⍕,` prepend string representation

`#⍎` make into number (in root namespace)

`⊢×` multiply by original number
> 9 votes

# Answer
## Retina, ~~27~~ 20 bytes

```
^
$_$*: $_
:
$_$*:
:

```

Gets a bit slow for large inputs, because before the last the stage the result is represented in unary.

Try it online! (The first line enables a linefeed-separated test suite.)

### Explanation

I'll use `2` as an example input (because the unary representations get a bit unwieldy for larger inputs).

**Stage 1: Substitution**

```
^
$_$*: $_

```

By matching the beginning of the string with `^` we simply prepend some stuff. `$_` refers to the input string itself and `$*:` means we insert that many colons. So we get:

```
:: 22

```

**Stage 2: Substitution**

```
:
$_$*:

```

Now we match every `:` and again replace it with `$_$*:`. Of course, this time `$_` doesn't evaluate to an integer (but to `:: 22` in our example), but `$*` just looks for the first decimal in the string, so this evaluates to the input concatenated to itself (`O` in the challenge specification). We'll end up with `N*O` colons, followed by `O`:

```
:::::::::::::::::::::::::::::::::::::::::::: 22

```

**Stage 3: Match**

```
:

```

All that's left is counting the `:`s to convert from unary back to decimal, which is exactly what this stage does.
> 9 votes

# Answer
# Jelly, ~~8~~ 6 bytes

```
ŒṘẋ2v×

```

Try it online!

## Explanation

```
ŒṘẋ2v× - Main link. Left argument: the number to convert

     × - Multiply
    v  - an evaluation of the left argument
ŒṘ     - converted to string
  ẋ    - multiplied by
   2   - two and the left argument

```
> 8 votes

# Answer
# Awk, 13 bytes

```
$0=($0$0)*$0

```

Set the line to 2 of itself multiplied by itself
> 8 votes

# Answer
## Lua, 20 Bytes

Takes in a command-line argument, and outputs via STDOUT

```
a=...print((a..a)*a)

```

And ungolfed as @LeakyNun asked in the comment :)

```
a=...       -- alias for the first argument
print(
     (a..a) -- concatenate a with itself, equivalent to a:rep(2)
     *a)    -- multiply the resulting number by a

```
> 7 votes

# Answer
# Brachylog, 7 bytes

```
:?c:?*.

```

### Explanation

```
:?c      Concatenate Input to itself
   :?*.  Output is that concatenation times Input

```
> 7 votes

# Answer
# Matlab / Octave, 20 bytes

```
@(x)eval([x x 42 x])

```

This is an anonymous function that takes the input as a string.

Example use:

```
>> f = @(x)eval([x x 42 x])
f =
    @(x)eval([x,x,42,x])
>> f('12')
ans =
       14544

```

Or try it online with ideone.

### Explanation

The code builds a string by concatenating the input string twice, then the character `*` (that has ASCII code 42), then the string again. The concatenated string is then evaluated.
> 7 votes

# Answer
# Python, 42 bytes

Pure arithmetic approach, without strings!

```
f=lambda n,m=1:m<=n and f(n,m*10)or-~m*n*n

```

Ideone it!
> 7 votes

# Answer
# MATL, 6 bytes

```
tVthU*

```

**Try it online!**

```
tV     % Input number implicitly. Duplicate and convert to string
th     % Duplicate and concatenate the two equal strings
U      % Convert to number
*      % Multiply

```
> 6 votes

# Answer
## zsh, 13 bytes

```
<<<$[$1$1*$1]

```

Takes input as a command line argument, outputs to STDOUT.

This only works in zsh, but here's **15 bytes in Bash** using `echo` instead of `<<<`:

```
echo $[$1$1*$1]

```
> 6 votes

# Answer
## Perl, 11 bytes

```
$_*=$_ x2

```

\+ the `p` and `l` flags.

(run with `perl -ple '$_*=$_ x2'`)

-2 bytes thanks to pipe.
> 6 votes

# Answer
## Excel VBA, 35 Bytes

Sub called with number, msgbox returns answer

```
Sub B(a)
MsgBox (a & a) * a
End Sub

```

**Alternative Excel VBA, 42 Bytes**

Number given in formula, returns answer.

```
Function B(a)
B = (a & a) * a
End Function

```
> 6 votes

# Answer
## Pyke, ~~5~~ 4 bytes

```
`+b*

```

Try it here!

```
`    -    str(input)
 +   -   ^+input  (convert to string implicitly)
  b  -  int(^)
   * - ^*input

```

Also 5 bytes with string inputs

```
+bRb*
+]mbB

```
> 5 votes

# Answer
# PHP, ~~25~~ 24 bytes

Short opening tags are useful for surprisingly few golfing challenges, luckily this is one of them. Unfortunately operator precedence is the opposite of the order you need to do them in so lots of brackets are needed.

```
<?=($a=$argv[1])*"$a$a";

```

edit: I realised that seeing as how I'm using brackets anyway I can effectively skip the concatenation operator by changing the written order of the operations around.
> 5 votes

# Answer
# dc, ~~11~~ 10 bytes

```
ddZAr^1+**

```

I *knew* that eventually I would find a use for the `Z` command!

Operation is fairly simple - count the digits, take 10 raised to that power and add one. This gives a multiplier that concatenates the number with itself. Then just multiply.

I/O uses the stack, as usual for dc.

## Full program

This is what I used for the tests:

```
#!/usr/bin/dc
?
ddZAr^1+**
p

```

The two extra commands give us pipeline I/O.

## Tests

```
$ for i in 1 2 3 10 174; do printf '%d -> ' $i; ./84712.dc <<<$i; done
1 -> 11
2 -> 44
3 -> 99
10 -> 10100
174 -> 30306276

```

Thanks are due to Sir Biden XVII (1 byte).
> 5 votes

# Answer
# PowerShell, ~~25~~, 18 bytes

Thank you TessellatingHeckler for reminding me how much PS loves the pipeline.

New 18 bytes:

```
process{$_*"$_$_"}

```

Old 25 bytes:

```
param($a);[int]"$a$a"*$a

```

Explanation:

```
# new
process{$_*"$_$_"}
process{         } # runs code block once for each passed item
        $_*        # multiple the first parameter
           "$_$_"  # concatenate as a string for ease
                   # in this case, the order does the typecasting for us
# old
param($a);[int]"$a$a"*$a
param($a)                 # assigns the first passed parameter to variable $a
         ;                # line terminator
          [int]           # type cast string "$a$a" to int32
               "$a$a"     # convert $a$a to string for easy concatenation
                     *$a  # multiply by $a

```

Testing (save as boring.ps1):

```
# new
12 | .\boring.ps1
14544
174 | .\boring.ps1
30306276

# old
.\boring.ps1 12
14544
.\boring.ps1 174
30306276

```

Definitely not the winning answer, but fun regardless!
> 4 votes

# Answer
# , ~~28~~ 27 bytes

*Edit: -1 byte thanks to @Dominic van Essen.*

```
(10^nchar(z<-scan())*z+z)*z

```

Try it online!

Shorter than bouncyball's solution with different approach.

**Explanation**

`z=scan()` gets input
`10^nchar(z))*z+z` is concatenation of the two copies of the number
`*z` at the end to get the result.
> 4 votes

# Answer
## Batch, ~~27~~ ~~20~~ 18 bytes

```
@cmd/cset/a%1%1*%1

```

Edit: Saved 7 bytes thanks to @TessellatingHeckler. Saved a further 2 bytes thanks to @EʀɪᴋᴛʜᴇGᴏʟғᴇʀ.
> 4 votes

# Answer
# Mumps, 11 bytes

```
R I W I_I*I

```

This is one of those rare golf challenges where the idiosyncrasies of Mumps can come in very handy. First, all variables are strings, and all math equations are strictly evaluated left-to-right (as in: not PEMDAS), so 1+2\*4=12 in Mumps instead of =9 the way PEMDAS would. So, (barely) ungolfed:

```
R I ;     Read from stdin to variable I
W I_I*I ; Write out I concatenated with I, then multiplied by I.

```

Word of caution - because the flavour of Mumps that I'm using (InterSystems Ensemble) does not echo the carriage return for stdin, the input and output number will appear concatenated. To rectify that / increase readability, you'd need to add two bytes and add a manual CR/LF, thusly:

```
R I W !,I_I*I

```

However, as I didn't see that requirement in the rules of the challenge, I'm pretty sure that I'm good with the shorter code. If I'm mistaken, please feel free to LART me and I'll modify my answer. :-)
> 4 votes

# Answer
# Perl 6, 11 bytes

```
{"$_$_"*$_}

```

```
#! /usr/bin/env perl6
use v6.c;
use Test;

my @tests = (
  12 => 14544,
   1 => 11,
   2 => 44,
   3 => 99,
  10 => 10100,
 174 => 30306276,
);

plan +@tests;

my &uninteresting = {"$_$_"*$_}

for @tests -> $_ ( :key($input), :value($expected) ) {
  is uninteresting($input), $expected, .gist
}

```

```
1..6
ok 1 - 12 => 14544
ok 2 - 1 => 11
ok 3 - 2 => 44
ok 4 - 3 => 99
ok 5 - 10 => 10100
ok 6 - 174 => 30306276

```
> 3 votes

# Answer
# Haskell, 22

I'm new to Haskell (and functional programming), so expert criticism is welcome.

```
f n=(read$n++n)*read n

main=do
  putStrLn $ show $ f "1"
  putStrLn $ show $ f "2"
  putStrLn $ show $ f "3"
  putStrLn $ show $ f "10"
  putStrLn $ show $ f "174"

```
> 3 votes

# Answer
# Curry (PAKCS), 26 bytes

```
f n=n*read(show n++show n)

```

Try it online!

-1 from ovs
> 3 votes

# Answer
# Clojure, 22 bytes

```
#(*(bigint(str % %))%)

```

Anonymous function which concatenates string representation of its argument covnerts it to BigInteger and multiplies by the argument. The output is in format `11N` (`N` signifies its a bigint), if there should be no `N` at the end then we can use

```
#(*(read-string(str % %))%)

```

for 27 bytes.

See it online: https://ideone.com/QqYfpo
> 2 votes

# Answer
# SpecBAS - 30 bytes

```
1 INPUT n$: ?VAL(n$+n$)*VAL n$

```

My shortest SpecBAS answer yet :-)
> 2 votes

# Answer
# Python, 51 Bytes

```
from math import*
g=lambda x:x*(x+x*10**(1+int(log10(x))))

```

Here's the mathematical way to do it (friend of mine found the formula). I guess using it wouldn't produce an answer shorter than 3 bytes. :)
> 2 votes

# Answer
## Japt, 4 bytes

```
U²*U

```

`²` translates to `p2`, which was (seemingly) designed to shorten the syntax for raising the number to the power of two. For strings, `p` function is repeating, not exponentiating, but the shortcut still works :) As you may've understood, takes the input as string.

Demo
> 2 votes

# Answer
# Hexagony, 23 bytes

```
?'=1*'\|@}*\=+=':<\}0.!

```

Embiggened:

```
    ? ' = 1
   * ' \ | @
  } * \ = + =
 ' : < \ } 0 .
  ! . . . . .
   . . . . .
    . . . .

```

Try it online!

As Hexagony doesn't have a concatenation function, it has to be done through multiplying the input by the appropriate factor of 10, then adding the input to it again. For example, `CONCAT(12,12)` can be implemented as `(12 * 100) + 12`.
> 2 votes

# Answer
# \>\<\>, 22 Bytes

```
a:{:@)8$.$a*!
::{*+*n;

```

Input is expected to be on the stack already. If that's not okay, then I'll probably mark this answer non-competing. Reading numeric inputs in \>\<\> is a real pain. Try it online

On a side note, this is my first post after a long period of inactivity; I'm glad to be able to contribute to this wonderful community again.

---

## Explanation

I'm using the term "padding" to refer to a "variable"\* that the input will be multiplied so that its digits may be duplicated.

e.g. if 12 is our input `N` and `1212` is the number `O`, then the padding used would be `100` since `12*100 + 12 = 1212`.

\*\>\<\> doesn't exactly have those, aside from the register (`&`), but you can effectively have them by manipulating the stack if that makes sense

### Line 1

```
a:{:@)8$.$a*!
a              push initial padding value (10)
 :{:           duplicate padding, bring input to front of stack and duplicate it
    @          manipulate stack so that it looks like [padding,input,padding,input]
     )         pop input and padding from top and push the result of (padding > input)
      8$.      push 8 and swap with the result, then jump to that location
         $     swap top so it looks like [input,padding]
          a*!  multiply padding by 10, skip pushing 10 at beginning

```

### Line 2

```
::{*+*n;
::        duplicate input twice -> [padding,input,input,input]
  {       bring padding from bottom -> [input,input,input,padding]
   *      multiply first input copy by padding
    +     add it to the second copy
     *    multiply by the final copy
      n   print result
       ;  terminate

```

Here's a hopefully more readable explanation.

### Line 1

```
a:{:@)8$.$a*!

```

The program initializes the stack so that it contains `[input,10]` (10 is the initial padding value). It then checks to see if the padding is greater than the input. The result of this (1 if true, 0 if false) is pushed onto the top of the stack. The pointer then jumps to the location (8,`padding>input`), which means that if the padding is greater than the input, the program goes to the second line and if it isn't it continues along on the first line. If it continues on the first line, it'll multiply the padding by 10 and repeat the process.

### Line 2

```
::{*+*n;

```

On Line 2, the program duplicates the input twice and then evaluates the expression `input*((input*padding) + input)` and prints it.
> 2 votes

# Answer
# Brachylog (2), 4 bytes

```
j:?×

```

Try it online!

## Explanation

```
j:?×
j     Append the input to itself
 : ×  then multiply by
  ?   the original input

```
> 2 votes

# Answer
# Wren, 41 bytes

```
Fn.new{|n|Num.fromString(n.toString*2)*n}

```

Try it online!

## Explanation

```
Fn.new{|n|                              } // New function with the parameter n
                         n.toString       // Convert the number to a string
                                   *2     // Duplicate this value
          Num.fromString(            )    // Convert to a number
                                      *n  // Multiply it with the original number

```
> 2 votes

# Answer
# Google Sheets, 11 bytes

```
=(A1&A1)*A1

```
> 2 votes

# Answer
## Fishing, 26 bytes

```
v+CCCCCCCCCC
  Icc{n{n}mP

```

**Explained column-by column**

1. Set casting direction downwards
2. Increase casting length to 1
3. Read input to first cell on tape
4. Concatenate first and second (empty) cell on tape and add to end of tape
5. Concatenate first and second (now containing input) cell and add to end of tape
6. Move to second cell (containing input)
7. Cast cell content to number
8. Move to third cell (containing input twice)
9. Cast cell content to number
10. Move to second cell.
11. Set content of second cell to second cell multiplied by third cell
12. Print second cell content
> 1 votes

# Answer
## Actually, 7 bytes

```
;;+k♂≈π

```

Try it online!

Explanation:

```
;;+k♂≈π
;;       duplicate input twice (3 total copies)
  +      concatenate two of the copies
   k♂≈   push to a list, convert all elements to ints
      π  product

```
> 1 votes

# Answer
## R 34 bytes

```
y=scan();as.numeric(paste0(y,y))*y

```
> 1 votes

# Answer
# hashmap, 8 bytes

```
i&&+d#d*

```

Explanation:

```
i&&+d#d*
i&&      Triple the input
   +     Add them together
    d#d  Convert both into a number
       * Multiply them

```
> 1 votes

# Answer
# Forth, 63 bytes

This feels horribly inefficient...

```
: f dup 2dup 10e s>f flog 1e f+ floor f** s>f f* s>f f+ f>s * ;

```

**Try it online**

Note that this works on Ideone (gforth-0.7.2), but not repl (JS-Forth), since repl doesn't support pushing numbers to the float stack or the `flog` and `floor` operations.

### Explanation

```
: f                     ( define a word/function named 'f'              )
dup 2dup                ( duplicate 3 times                             )
10e                     ( push 10 to float stack, not used for log{n}   )
s>f flog                ( move # to f-stack and get its log-10          )
1e f+ floor             ( increment the above result by 1 and floor     )
f**                     ( use the 10 pushed earlier, 10**log{n}         )
s>f f* s>f f+           ( mul by n, then add n                          )
f>s * ;                 ( to regular stack, mul by n, end definition    )

```
> 1 votes

# Answer
# Mathematica, 24 bytes

```
a=FromDigits;a[#<>#]a@#&

```

Anonymous function, takes a string representing a number as input and generates its corresponding uninteresting number.
> 1 votes

# Answer
# Coffeescript, ~~36~~ ~~34~~ 19 bytes

Thanks to @Fawful for shaving off 2 bytes, and to @joeytwiddle for some more

```
a=(n)->(""+n+n|0)*n

```

Neater script and explanation:

```
a=(n)->               # Creates a new function
       (""+n+n|0)     # Concatenate as strings, then convert back to integer
                 *n   # then multiplies it by n

```
> 1 votes

# Answer
# Ruby, 22 Bytes

```
->n{(n*2).to_i*n.to_i}

```

Takes input as a string. Double the string, and then multiply it by the input, both as integers
> 1 votes

# Answer
## Your mom, 6 bytes

```
ð::+*

```

The name of this language is a idea from mbomb007...

Explanation:

```
ð     Read a string from stdin
 ::   : is the duplicate operator, so the input is duplicated 2 times
   +*
      Implicit output

```
> 1 votes

# Answer
## Logy, 40 bytes

```
main[A]->print[atoi[A(1)*2]*atoi[A(1)]];

```

Ungolfed:

```
main[Args] -> print[atoi[Args(1)*2]*
                    atoi[Args(1)]];

```
> 1 votes

# Answer
# RProgN, 9 Bytes

```
] ] . * _

```

## Explanation

```
] ]     # Push two copies of the top of the stack, which implicitly contains the input.
.       # Concatenate the top two values of the stack, and push it to the top of the stack.
*       # Multiply the top two values of the stack
_       # Floor the top of the stack, to make it pretty.
        # Implicitly print

```

Yay for Stack Based Loosly typed languages. The main downside of RProgN is that (Currently) whitespace is needed for a function to run (Aside from the last command). Which wastefully adds four whole bytes.
> 1 votes

# Answer
# TI-Basic, 9 bytes

Input should be passed as string

```
expr(Ans)expr(Ans+Ans

```
> 1 votes

# Answer
# k, 14 bytes:

```
{x*"J"$s,s:$x}

```

Explanation:

```
x              // implicit input
  $            // string the input
    s:         // set variable s to..
      s,s      // append s to s
        "J"$   // cast to 64bit int
           x*  // multiply by original input, return is implicit

```
> 1 votes

# Answer
# Brain-Flak, 226 bytes

```
((({}))){(({})(<><>))<>((()())(({}){}){}){(({})){({}[()])<>}{}}{}<>([{}()]{})(<>{}(<>))<>((()())(({}){}){})([()]{()<(({})){({}[()])<>}{}>}{}<><{}{}>)}{}<>([]){{}({}<>(({}){})(({}){}){})<>([])}{}<>({}<>)({<({}[()])><>({})<>}{})

```

Try it online!

The main idea here is to decompose N into its digits, putting the digits on the off-stack; then we can calculate O by multiplying N by 10, adding a digit from the off-stack, and repeating until the off-stack is empty. Multiplying that result by another copy of N gives the final answer. I borrowed pretty heavily from the arithmetic algorithms here, tweaking them a bit to fit into this particular program in fewer bytes.

```
Make two more copies of the input
((({})))
The third copy will be decomposed into its digits
Loop while the partially decomposed number is not zero:
{
 Push a zero and a copy of the number
 (({})(<><>))
 Switch to the off-stack and push 10
 <>((()())(({}){}){})
 Modulo algorithm: we end up on the off-stack with number % 10 on top
 {(({})){({}[()])<>}{}}{}<>([{}()]{})
 Push a zero and the top of the main stack to the off-stack, popping the main stack
 (<>{}(<>))
 Switch to the main stack and push 10
 <>((()())(({}){}){})
 Division algorithm: we end up on the main stack with number / 10 on top, and without any
 junk left on the off-stack
 ([()]{()<(({})){({}[()])<>}{}>}{}<><{}{}>)
}
Pop the leftover zero, switch to off-stack, and push stack height
{}<>([])
Loop while stack height is not zero:
{
 Discard stack height
 {}
 Add top of off-stack to 10 times top of main stack and push to main stack
 ({}<>(({}){})(({}){}){})
 Switch back to off-stack and push stack height
 <>([])
}
Discard stack height and switch to main stack
{}<>
Multiplication algorithm: we end up with O*N on the stack, which the program outputs
({}<>)({<({}[()])><>({})<>}{})

```
> 1 votes

# Answer
# Keg, 7 bytes

```
::⑫++ℤ*

```

Try it online!

Simply duplicate the input twice, push an empty string, add the input to that string, convert to integer and multiply by original input
> 1 votes

# Answer
# GolfScript, 7 bytes

```
.2*~\~*

```

Try it online!

Explanation:

```
.2*       duplicate, concatenate duplicate to self
   ~\~    convert both strings to ints
      *   multiply

```
> 1 votes

# Answer
# Vyxal, 2 bytes

```
J*

```

Try it Online!
> 1 votes

# Answer
# Desmos, 28 bytes

```
f(n)=10^{floor(logn)}10nn+nn

```

Try It On Desmos!

Try It On Desmos! - Prettified
> 1 votes

# Answer
# Ly, 8 bytes

```
nsS&:Jl*

```

Try it online!

`Ly` supports a pretty direct translation of the rules of this challenge...

```
n         - read in the number
 s        - stash the number
  S       - push the digits of the number onto the stack
   &:     - append the stack to itself
     J    - convert those digits to a number
      l   - restore the original number
       *  - multiple, stack prints as number automatically

```
> 1 votes

# Answer
# Ruby, ~~31~~ 26 bytes

*-5 bytes thanks to pxeger and Steffan*

```
n=gets;p (n+n).to_i*n.to_i
```

Attempt This Online!
> 1 votes

# Answer
# Zsh, 13 bytes

```
<<<$[$1*$1$1]
```

Attempt This Online!
> 1 votes

# Answer
# Haskell, 23 bytes

A pointfree function which takes and returns an integer.

```
(*)<*>read.(show<>show)
```

Attempt This Online!
> 1 votes

# Answer
# Julia 1.0, 35 bytes

```
!x=(10^floor(Int,log10(x)+1)*x+x)*x

```

Try it online!
> 1 votes

# Answer
# Japt, 2 bytes

Takes input as a string

Try it

```
*²     :Implicit input of string
*      :Multiplied by
 ²     :Itself duplicated

```
> 1 votes

# Answer
# Julia 1.0, 21 bytes

```
!n=parse(Int,"$n$n")n

```

Try it online!
> 1 votes

# Answer
# C, ~~52~~ 50 bytes

```
q;f(char*v){q=atoi(v);return atoi(strcat(v,v))*q;}

```

### Usage

```
q;f(char*v){q=atoi(v);return atoi(strcat(v,v))*q;}
main(c,v)char**v;{while(*++v)printf("%d\n",f(*v));}

```

## Full Program ~~75~~ 69 bytes

```
q;main(c,v)char**v;{q=atoi(*++v);printf("%d",atoi(strcat(*v,*v))*q);}

```

*-2* & *-6* thanks to Toby Speight in this comment
> 0 votes

# Answer
# ForceLang, 54 bytes, noncompeting

```
set a io.readnum()
io.write a.mult number.parse a+""+a

```

Noncompeting, because it requires a language version published after this challenge (containing a patch for a minor parse error relating to the empty string literal).

---

The original answer, which doesn't require this bugfix (76 bytes):

```
set a io.readnum()
set b a+string.builder()
io.write a.mult number.parse b+a

```
> 0 votes

# Answer
# Racket, ~~74~~ 62 bytes

```
(λ(n)(*((λ(m)(string->number(string-append m m)))(~a n))n))

```

I hate the length of built-in function names in Racket sometimes. Other times, I discover a really concisely named version of a function and transform a `number->string` into `~a`.
> 0 votes

# Answer
## Common Lisp (Lispworks), ~~91~~ ~~78~~ 77 bytes

```
(defun f(n)(*(parse-integer(concatenate'string #1=(write-to-string n)#1#))n))

```
> 0 votes

# Answer
# Python 3, 43 bytes

```
x=int(input());print(10**len(str(x))*x+x)*x

```
> 0 votes

# Answer
## SAS, 32 Bytes

```
%macro x(a);%eval(&a&a*&a)%mend;

```

Macro language, so no string/numeric concept. Function style (so this doesn't return the value to the screen, that's your job, this just returns the value).

Examples:

```
86   %put %x(1);
11
87   %put %x(12);
14544

```
> 0 votes

# Answer
# Jolf, 4 bytes

Try it here!

```
*P+§

```

## Explanation

```
*P+§xxx
*     x   implicit input *
   §x       implicit input as string
  +  x      followed by implicit input
 P         as a number

```
> 0 votes

# Answer
# T-SQL, 45 bytes

```
DECLARE @i INT = 12
SELECT CONCAT(@i, @i)*@i

```
> 0 votes

# Answer
# TI-BASIC, 22 or 24 bytes

```
Prompt X
X(X+X10^(1+int(log(X

```

Or, 22 bytes stored as a Y-var (basically a function).
> 0 votes

# Answer
# Python, 46 bytes

```
i=input("N:")           # Standard input
y=i+(i[-2:])            # Using strip method to take last two chars from input
print(int(y)*int(i))    # Temp convert strings into integers for maths and print the result.

```
> 0 votes

# Answer
# JavaScript, 25 bytes

### Golfed:

```
_=prompt();alert((_+_)*_)

```

### Ungolfed:

```
_=prompt();
alert((_+_)*_)

```

### Explanation:

```
_=prompt();    - set variable to prompt
alert((_+_)*_) - alert output, which is the number plus itself, times itself

```

---

This code was originally written by TùxCräftîñg. Their original comment with the code can be found here.
> 0 votes

# Answer
# PHP, 32 bytes

```
function f($n){print($n.$n)*$n;}

```

Try it online!
> 0 votes

# Answer
# Arturo, 28 bytes

```
$[n][n*to :integer~"|n||n|"]

```

Try it
> 0 votes

# Answer
# , 6 bytes

```
*&".,~

```

Similar to miles' 7 bytes but found independently and accepts a string.

Attempt This Online!

```
*&".,~   NB. Monadic hook (y f g y)
    ,~   NB. concat input with itself
 &       NB. compose, f&g applies g to both args and applies f to the results
  ".     NB. eval
*        NB. multiply

```
> 0 votes

# Answer
# Thunno, \\$ 8 \log\_{256}(96) \approx \\$ 6.58 bytes

```
DdDA+ZD*

```

Attempt This Online!

#### Explanation

```
DdDA+ZD*  # Implicit input                    Example: input = 10
Dd        # Duplicate and get digits          10, [1, 0]
  DA+     # Duplicate and concatenate         10, [1, 0, 1, 0]
     ZD   # Convert from a list of digits     10, 1010
       *  # Multiply                          10100
          # Implicit output

```
> 0 votes

# Answer
# Pyt, 7 bytes

```
ĐĐąŁᴇ⁺Π

```

Try it online!

Takes in an integer

```
ĐĐ       implicit input (n); triplicate on stack
  ąŁ     get number of digits in n
    ᴇ⁺   raises 10 to that power
      Π  takes the product of everything on the stack; implicit output

```
> 0 votes

# Answer
# JavaScript, 13 bytes

```
x=>(''+x+x)*x

```

Try it:

```
f=x=>(''+x+x)*x

console.log(f(1)); // 11
console.log(f(2)); // 44
console.log(f(3)); // 99
console.log(f(10)); // 10100
console.log(f(174)); // 30306276
```
> 0 votes

# Answer
# Thunno 2, 3 bytes

```
Ḍ,p

```

Attempt This Online!

Takes the input as a string (allowed by OP).

#### Explanation

```
Ḍ,p  # Implicit input                   -> "12"
Ḍ    # Double                           -> "1212"
 ,   # Pair with input                  -> ["12", "1212"]
  p  # Product (implicit cast to int)   -> 14544
     # Implicit output

```
> 0 votes

---
Tags: code-golf, math, number, sequence
---


# Question
Title: Bernardino identifies unaltered dollar words
# Definition

A dollar word is a word where when each of its letters is given a cent value, from a = 1 to z = 26, and the letters are summed, the result is 100. Here is an example on CodeReview, and here is a list of dollar words I found online.

# Input

Input will be alphabetical from a-z, in your one language's text datatypes (arrays are allowed). You do not need to account for any other input - there will be no spaces, apostrophes, or hyphens. You can take as lowercase, uppercase, or a combination. Trailing newlines are allowed.

# Output

Output a truthy value if the input is a dollar word, and a falsey value if it is not.

# Test Cases

Truthy:

```
buzzy
boycott
identifies
adiabatically
ttttt

```

Falsey:

```
zzz
zzzzzzz
abcdefghiljjjzz
tttt
basic

```

This is code-golf, so the shortest answer in bytes wins! Standard loopholes and rules apply. Tie goes to first poster.

# Answer
# GS2, 6 bytes

```
▲1Θd←q

```

Input must be in uppercase.

Try it online!

### How it works

```
  Θ       Combine the previous two tokens into a block and map it over the input.
▲             Push 64.
 1            Subtract 64 from the character on the stack.
   d      Take the sum of the resulting character array.
    ←     Push 100.
     q    Compare the two items on the stack for equality.

```
> 7 votes

# Answer
# 05AB1E, 8 bytes

Code:

```
Ç96-O4bQ

```

Uses the **CP-1252** encoding. Try it online!

Explanation:

```
Ç          # Convert the string into a list of character codes
 96-       # Subtract 96 of each element
    O      # Take the sum
     4b    # Push 100 (4 in binary)
       Q   # Check if equal

```
> 14 votes

# Answer
# Python, ~~39~~ 38 bytes

```
lambda s:sum(ord(i)-96for i in s)==100

```

Try it online!

---

-1 byte thanks to @JonathanAllan
> 13 votes

# Answer
# Raku, 21 bytes

```
{100==[+] .ords X%32}

```

Try it

Alternate:

```
{Ⅽ==[+] .ords X%32}

```

Try it

Note that the  is `ROMAN NUMERAL ONE HUNDRED` U+216D with a unival of … 100
Which takes 3 bytes to encode.

## Expanded:

```
{  # bare block lambda with implicit parameter $_

  100     # is 100
  ==      # equal to
  [+]     # the sum of the following

    .ords # the ordinals of the input (implicit method call on $_)
    X[%]  # crossed using the modulus operator
    32    # with 32 to get 65..90 or 97..122 to become 1..26
}

```
> 12 votes

# Answer
# MATL, 8 bytes

```
96-s100=

```

Uses lowercase input.

Try it online!

### Explanation

The code is as readable as it gets:

```
96-   % Implicitly input string. Subtract 96 from each char interpreted as ASCII code
s     % Sum of array
100=  % Does it equal 100? Implicitly display

```
> 12 votes

# Answer
## JavaScript (ES6), 46 bytes

Returns `0` or `1`.

```
let f =

w=>[...w].map(c=>p-=parseInt(c,36)-9,p=100)|!p

console.log(f('buzzy'))
console.log(f('qwerty'))
```
> 7 votes

# Answer
# C, ~~45~~ 43 bytes

*Thanks to @Neil for saving two bytes and making the solution case-insensitive!*

```
n;f(char*s){for(n=100;*s;)n-=*s++&31;n=!n;}

```

Try it online!
> 7 votes

# Answer
# Mathematica, 23 bytes

```
100==Tr@LetterNumber@#&

```

Pure function taking a string (or an array of letters) as input, case-insensitive, and returning `True` or `False`. Here `Tr` just adds the letter-numbers together; everything else is self-explanatory.
> 7 votes

# Answer
# Haskell, 32 bytes

```
f s=sum[1|c<-s,_<-['a'..c]]==100

```

Try it online!

The idea is to make a list of characters from `a` to the given character for each character in the list, and check that the total length is 100.

Other attempts:

```
f s=sum[1|c<-s,_<-['a'..c]]==100

f s=sum[fromEnum c-96|c<-s]==100
f s=100==length((\c->['a'..c])=<<s)
(==100).length.(>>= \c->['a'..c])
(==100).length.(=<<)(\c->['a'..c])
(==100).length.(enumFromTo 'a'=<<)
f s=100==length(do c<-s;['a'..c])

```

Too bad `enumFromTo` is so long.
> 7 votes

# Answer
# Jelly, ~~9~~ 7?\* 8 bytes

```
ɠO%32S⁼³

```

Full program, outputting 1 if the input is a dollar word, or 0 if not.

**Try it online!**

### How?

```
ɠO%32S⁼³ - Main link
ɠ        - read a line of input from STDIN
 O       - cast to ordinals
  %32    - mod 32 (vectorises) (-3*32=96 from lowercase; -2*32=64 from uppercase)
     S   - sum
       ³ - literal: 100
      ⁼  - equal?

```

---

* Could it be 7 bytes?

The only reason this took input with `ɠ` was to keep `³` as the literal 100 rather than the 3rd command line input (1st program input).

A way to avoid that would be, as pointed out by Dennis, to create 100 using the raw literal form `ȷ2` which is 102. This leads to another 8 byte `O%32S=ȷ2`, but this is now an unnamed monadic function (as well as operating as a full program with a 3rd argument).

Since, in golf, one may create variables or helper functions which restrict the program in which they may reside (one cannot reuse the name in-scope without stopping the function from being reusable), maybe restricting the program to only taking input from STDIN may also be acceptable, in which case the 7 byte `O%32S=³` would be acceptable here as an unnamed function.
> 6 votes

# Answer
# Haskell, 32 bytes

```
f w=sum[fromEnum c-96|c<-w]==100

```

This works for lowercase input. For uppercase, `s/96/64/`. Mixed-case support would add a bunch of bytes.
> 6 votes

# Answer
# R, ~~55~~ 54 bytes

```
function(x)sum(match(el(strsplit(x,"")),letters))==100

```

-1 byte thanks to BLT

* returns a function that does the required computation, which returns `TRUE` and `FALSE` as one would expect.
* takes input in as lowercase; would only be a switch from `letters` to `LETTERS` for all uppercase
> 6 votes

# Answer
# Java 8, 36 bytes

```
s->s.chars().map(c->c%32).sum()==100

```

Try it online!

Note: case independent.
> 6 votes

# Answer
## Alice, 23 bytes

```
/o!
\i@/e)q&w[?'`-+k3-n

```

Try it online!

Input should be lower case. Prints `1` for dollar words and `0` otherwise.

### Explanation

Time to show off Alice's tape and some advanced control flow. Despite being fairly good at working with integers and strings individually, Alice has no built-ins to a) determine a string's length, b) convert between characters and their code points. The reason for this is that all of Alice's commands either map integers to integers or strings to strings. But both of those would require mapping strings to integers or vice versa, so they don't fit into either of Alice's modes.

However, in addition to it's stack, Alice also has a tape and Cardinal and Ordinal mode interpret the data on the tape in different ways

* In Cardinal mode, it's a regular tape familiar from other languages like Brainfuck. You can store one integer in each cell and you can move a tape head around. The tape is infinitely long and initially holds a **-1** in every cell. The cells are also indexed and the tape head starts at index **0**.
* Ordinal mode has its own tape head (also starting at index **0**) and it interprets the tape as a list of strings. Strings are terminated by non-character cells (i.e. any values which are not a valid Unicode code point), in particular **-1**. So for Ordinal mode, the tape is initially filled with empty strings.

This tape can be used for both of the above operations: to get a string length, we write it to the tape in Ordinal mode, seek the terminating **-1** in Cardinal mode and retrieve the position of the tape head. To convert characters to their code points, we simply read them off the tape in Cardinal mode.

The other two important features used in this solution are the return stack and an iterator. Alice has a return stack which is usually filled when using the jump command `j`, and which you can pop an address from to jump back with `k`. However, it's also possible to push the current address to the return stack without jumping anywhere with `w`. If we combine `w` with the *repeat* command `&`, we can push the current address to the return stack **n** times. Now each time we reach `k`, one copy is popped off the return stack and we perform another iteration from `w` (starting at the cell after it, because the IP moves before executing another command). When the return stack becomes empty, `k` does nothing at all and the IP simply passes through. Hence `&w...k` pops an integer **n** and then executes `...` **n+1** times, which gives us a very concise way to express a simple `for` loop.

On to the code itself...

```
/     Reflect to SE. Switch to Ordinal.
i     Read the input word as a string.
      Bounce off bottom boundary, move NE.
!     Store the input word on the tape.
      Bounce off top boundary, move SE.
/     Reflect to E. Switch to Cardinal.
e     Push -1.
)     Seek right on the tape for a -1, which finds the -1 terminating
      the input word.
q     Push the tape head's position, which gives us the string length N.
&w    Repeat this loop n+1 times (see above for an explanation)...
  [     Move the tape head left by one cell.
  ?     Retrieve the code point of the character in that cell.
  '`    Push 96.
  -     Subtract it from the code point to convert the letters to 1...26.
  +     Add the result to a running total. This total is initialised to
        zero, because in Cardinal mode, the stack is implicitly filled with
        an infinite amount of zeros at the bottom.
k    End of loop.
     Note that the above loop ran once more than we have characters in the
     string. This is actually really convenient, because it means that we've
     added a "-1 character" to the running total. After subtracting 96 to
     convert it to its "letter value" this gives 97. So dollar words will
     actually result in 100 - 97 = 3, which we can check against for one
     byte less than for equality with 100.
3-   Subtract 3 to give 0 for dollar words.
n    Logical NOT. Turns 0 (dollar words) into 1 and everything else into 0.
     The IP wraps around to the beginning of the first line.
\    Reflect to NE. Switch to Ordinal.
o    Implicitly convert the result to a string and print it.
     Bounce off top boundary, move SE.
@    Terminate the program.

```
> 6 votes

# Answer
# Ruby, 25 bytes

```
->s{s.sum-s.size*64==100}

```

Works for uppercase.

I see a couple of more complex Ruby entries, but it really is this simple. `s.sum` adds the ASCII codes of the input string, and from this we subtract 64 times the length of the string.

**Example of use**

```
f=->s{s.sum-s.size*64==100}

puts f["ADIABATICALLY"]
puts f["ZZZ"]

```
> 6 votes

# Answer
# Perl 5, 30 bytes

*-1 byte thanks to @Neil (`31&` instead of `-96+`).*

29 bytes of code + `-p` flag.

```
$@+=31&ord for/./g;$_=$@==100

```

Try it online!
> 5 votes

# Answer
# 05AB1E, 9 bytes

```
5bIvAyk>-

```

Try it online!

**Explanation**

As **1** is the only truthy value in 05AB1E we can save a byte using subtraction over comparing to *100*.

```
5b         # convert 5 to binary (results in 101)
  Iv       # for each letter in input word
    Ayk    # get the index of the letter in the alphabet
       >   # increment
        -  # subtract from total

```
> 5 votes

# Answer
# PowerShell, 36 30 bytes

```
$args|%{$s+=$_[0]-96};$s-eq100

```

Try it online!

Inputs as an array, but I'm wondering if there is a better way to handle characters.

**EDIT** Missed an easy space but @AdmBorkBork kindly let me know :P also, there was in fact a better way to handle the characters!
> 5 votes

# Answer
# Dyalog APL, ~~17~~ 15 bytes

```
100=+/17-⍨⎕AV⍳⍞

```

Uses the Dyalog Classic character set.

```
              ⍞  ⍝ string input
          ⎕AV⍳   ⍝ index in the character map
      17-⍨       ⍝ subtract 17 from each ('a' = 18)
    +/           ⍝ sum
100=             ⍝ equal to 100?

```
> 5 votes

# Answer
# Alice, ~~28~~ 18 bytes

*Thanks to @MartinEnder for golfing 10 bytes*

```
=I.!'`-+?hn
>3-nO@

```

Try it online!

This submission uses a different method than @MartinEnder's answer.

This submission outputs `0x00` for falsy and `0x01` for truthy.

So here is a version that outputs `0` or `1` instead: Try it!

### Explanation

The explanation below is for the "visible" version. Both are very similar, except in the first program, the last `o` doesn't convert the `0` or `1` into a string (because we are in cardinal mode), but instead takes the number and output the character at that code point.

```
=                 Does nothing, but will be useful later on
I                 Read a character and push its code point onto the stack
                  If there is no more input, -1 is pushed instead
.                 Duplicate it
!                 Store it on the tape
#                 Skip the next command
o                 Gets skipped
'`                Push 96
-                 Subtract it from the character
+                 And add it to the total
?                 Load the number on the tape
h                 Increment it
n                 And negate it
                  For all characters that are read, ?hn results in 0,
                  but if -1 is pushed, then the result becomes 1

```

After this the IP wraps around to the left edge at the `=`. If the top value of the stack is `0`, the IP continues on with its path, increasing the total sum of all the characters, once it is done with the input (the top of the stack will be `1`), then the IP turns right (90 degrees clockwise).

One thing is important to note, the loop on the first line will iterate once after the input has ended. This will subtract `97` (`96` from the `'`` and `-1` from the lack of input) from the total.

```
>                Set the direction of the IP to East
3-               Subtract 3 from it (yields 0 if sum is 100, something else otherwise)
n                Negate it; Zero becomes 1, non-zero numbers become 0
/                Mirror; the IP gets redirected South-East
                 The IP reflects off the bottom and goes North-East
                 Now the program is in Ordinal mode, where numbers are automatically converted into strings when being used
o                Output the top of the stack as a string
                 IP reflects off the top and heads South-East
@                End the program

```
> 5 votes

# Answer
# Taxi, 1259 bytes

```
Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Auctioneer School.Go to Auctioneer School:s 1 r 1 l 1 l.Pickup a passenger going to Chop Suey.0 is waiting at Starchild Numerology.Go to Starchild Numerology:s 1 l.Pickup a passenger going to Addition Alley.Go to Chop Suey:e 1 l 2 r 3 r 3 r.[a]Switch to plan "b" if no one is waiting.Pickup a passenger going to Charboil Grill.Go to Charboil Grill:n 1 l 3 l 3 l.Pickup a passenger going to What's The Difference.Go to Go More:e.64 is waiting at Starchild Numerology.Go to Starchild Numerology:e 2 r.Pickup a passenger going to What's The Difference.Go to What's The Difference:e 1 l 2 r 1 l.Pickup a passenger going to Addition Alley.Go to Addition Alley:e 2 r.Pickup a passenger going to Addition Alley.Go to Chop Suey:n 1 r 2 r.Switch to plan "a".[b]Go to Addition Alley:n 1 l 2 l.Pickup a passenger going to Equal's Corner.100 is waiting at Starchild Numerology.Go to Starchild Numerology:n 1 l 1 l 3 l 2 r.Pickup a passenger going to Equal's Corner.Go to Equal's Corner:w 1 l.Switch to plan "c" if no one is waiting."TRUE" is waiting at Writer's Depot.[c]"FALSE" is waiting at Writer's Depot.Go to Writer's Depot:n 1 l 1 r.Pickup a passenger going to Post Office.Go to Post Office:n 1 r 2 r 1 l.

```

With line breaks, it looks like this:

```
Go to Post Office:w 1 l 1 r 1 l.
Pickup a passenger going to Auctioneer School.
Go to Auctioneer School:s 1 r 1 l 1 l.
Pickup a passenger going to Chop Suey.
0 is waiting at Starchild Numerology.
Go to Starchild Numerology:s 1 l.
Pickup a passenger going to Addition Alley.
Go to Chop Suey:e 1 l 2 r 3 r 3 r.
[a]
Switch to plan "b" if no one is waiting.
Pickup a passenger going to Charboil Grill.
Go to Charboil Grill:n 1 l 3 l 3 l.
Pickup a passenger going to What's The Difference.
Go to Go More:e.
64 is waiting at Starchild Numerology.
Go to Starchild Numerology:e 2 r.
Pickup a passenger going to What's The Difference.
Go to What's The Difference:e 1 l 2 r 1 l.
Pickup a passenger going to Addition Alley.
Go to Addition Alley:e 2 r.
Pickup a passenger going to Addition Alley.
Go to Chop Suey:n 1 r 2 r.
Switch to plan "a".
[b]
Go to Addition Alley:n 1 l 2 l.
Pickup a passenger going to Equal's Corner.
100 is waiting at Starchild Numerology.
Go to Starchild Numerology:n 1 l 1 l 3 l 2 r.
Pickup a passenger going to Equal's Corner.
Go to Equal's Corner:w 1 l.
Switch to plan "c" if no one is waiting.
TRUE is waiting at Writer's Depot.
[c]
FALSE is waiting at Writer's Depot.
Go to Writer's Depot:n 1 l 1 r.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 r 2 r 1 l.

```

It accepts upper or lowercase because the `Auctioneer School` converts it all to uppercase.
`Chop Suey` breaks it into individual characters.
`Charboil Grill` converts characters to their ASCII code.
We pickup one character a time, convert it to ASCII, subtract 65, and add it to the running total.
Once there aren't any more characters, compare the total to 100.

Returns `TRUE` for dollar words and `FALSE` for everything else.
> 5 votes

# Answer
# IA-32 machine code, 21 bytes

Hexdump:

```
33 c0 6a 64 5a 8a 01 41 24 1f 75 05 83 ea 01 d6
c3 2b d0 eb f0

```

Assembly code:

```
    xor eax, eax;   initialize eax to 0
    push 100;       initialize edx
    pop edx;            to 100
myloop:
    mov al, [ecx];  load a byte
    inc ecx;        go to next byte
    and al, 31;     convert from letter to number
    jnz cont;       not done? continue

    ;               done:
    sub edx, 1;     check whether edx got to 0; result is in CF
    __emit(0xd6);   aka SALC - set al to CF
    ret
cont:
    sub edx, eax
    jmp myloop

```

Counts from 100 to 0. If arrived to 0, returns true (0xff); otherwise false (0x00).
> 5 votes

# Answer
# ///, ~~564~~ ~~210~~ ~~189~~ 185 bytes

```
/~/1\/\///4/11~3/41//6/33//2/66//5/22~a/~b/1~c/4~d/3~e/31~f/34~g/6~h/16~i/46~j/36~k/316~l/346~m/2~n/12~o/42~p/32~q/312~r/342~s/62~t/162~u/462~v/362~w/3162~x/3462~y/22~z/122~5555/0///1/0

```

Try it online!

Prints a 1 if it is a "dollar word", otherwise prints a "0"

Input is the following: (Scroll all the way to the right)

```
/~/1\/\///4/11~3/41//6/33//2/66//5/22~a/~b/1~c/4~d/3~e/31~f/34~g/6~h/16~i/46~j/36~k/316~l/346~m/2~n/12~o/42~p/32~q/312~r/342~s/62~t/162~u/462~v/362~w/3162~x/3462~y/22~z/122~5555/0//INPUT WORD HERE/1/0

```

Works by replacing each letter with its value in unary, then replacing a unary 100 with a 0. It then substitutes whatever the word's value is with a 1. If the word's value is 0, then it will print a 1 because at the end of the code, it is replacing a 0. If the word's value is anything else, it will just print that 0.

The golf works by using common occurrences in the code as replacements.
> 4 votes

# Answer
# Python, 38 bytes

```
lambda s:sum(map(ord,s))==4-96*~len(s)

```

Try it online!

Same length as ovs's solution. Rather than subtracting 96 from each `ord` value, this checks if the `ord` total equals `100+96*len(s)`. This is expressed one byte shorter as `4-96*~len(s)`, which equals `4-96*(-len(s)-1)`.
> 4 votes

# Answer
# Japt, 13 12 10 bytes

```
L¥U¬x_c %H

```

### Explanation:

```
L¥ U¬x _c %H
L¥(U¬x(_c %H))
L¥(          )   // 100==
   U¬            //   Input split into a char array
     x(     )    //   The sum of:
       _         //     At each char:
        c        //       Get the char-code and
          %H     //       Mod 32

```

Test it online!

12-bytes:

```
L¥U¬mc m%H x

```

Try it online!

Another 12-byte solution using a different technique

```
L¥U¬x@;CaX Ä

```

Try it online!
> 4 votes

# Answer
# Ruby, ~~35~~ 30 bytes

```
->w{196==eval(w.bytes*'-96+')}

```

Try it online!
> 4 votes

# Answer
# Retina, ~~47~~ 23 bytes

```
\w
!$&
}T`l`_l
^!{100}$

```

Try it online! Note: Header lowercases input and splits it into words; results appear on separate lines. Edit: Saved far too many bytes thanks to @MartinEnder.
> 4 votes

# Answer
# Octave, 18 bytes

```
@(x)sum(x-96)==100

```

Subtracts `96` from the input string `x` (lower case), to get the numeric values of the letters. Takes the `sum` and compares it to `100`. Returns a logical `1` for truthy cases, and a logical `0` for false cases.

I could save one byte if it was OK to give false for "dollar words" and true for "non-dollar words".
> 4 votes

# Answer
# Ruby (2.4+), 38 bytes

Takes input in lowercase. Requires Ruby 2.4's `Array#sum` so it won't run on TIO.

```
->a{a.chars.map{|c|c.ord-96}.sum==100}

```
> 3 votes

# Answer
# Aceto, 49 bytes

TL;DR: 3rd-order Hilbert curve. Uses character input, looping until a newline is given. Sums up the values (96 (5\*3+9\*9) minus them), and in the end adds 100 (5\*5\*4) and checks whether it's zero. Uses the fairly new catch marks.

```
}){(
(o-+
d{))
|(&
=,d@*45(
{d""*+5(
3*)+=0
599*p

```

Outputs `True` if the given word is a dollar word, `False` otherwise.

### Explanation:

We first construct a 96 by calculating 5\*3+9\*9: `53*99*+`. Next, we move a stack to the right and push an empty string: `)""`. Because we're about to enter a repeating part, we set the catching mark using `@`. This is where we will return if an error occurs.

We `d`uplicate the empty string, read a single character (`,`), `d`uplicate that character, and move it to the original stack (`{`). Still on the right stack, we compare the top two values (the empty string and our character) and use the conditional mirror to jump to the right edge if they are equal: `=|`.

Assuming they're not, we now move on the left stack, push the character once more one stack to the left, duplicate the 96, go to the left stack, push the character back on the middle stack and go there again: `({d(})`.

Now we convert the character to the value of its unicode codepoint and subtract it from 96, resulting in it's negated dollar value: `o-`. We do it this way, because we'd have to swap the values otherwise. We push the value to the left stack, go there, and add the two values there (initially 0 and our negative character value): `{(+`. To prepare for reading another character, we go to the middle stack again `)`, and then raise an error: `&`.

Once a newline is read and the character is therefore empty and the equality truthful, we got mirrored somewhere on the top-left quadrant; the exact position doesn't matter in our case. The next operation that does something is moving back on the stack of our final value: `((`. On it, we should now have the sum of all character values, negative. That means, if it's a dollar word, it should be -100. To test whether it is, we add 100 (`554**+`), push `0`, test for equality and print the result: `=p`.
> 3 votes

# Answer
# Bash + GNU utils, 47

```
od -An -td1 -vw1|sed 's/^/a+=-96+/;$a!a-100'|bc

```

Try it online.
> 3 votes

# Answer
# R, 36 ~~39~~ bytes

Using a different method than the other R answer

```
function(x)sum(utf8ToInt(x)-96)==100

```

This is an unnamed function for lowercase characters. utf8ToInt(x) converts the string into a vector of ascii values. 96 is taken away from all items and sum checked against 100.

In use

```
> f=
+ function(x)sum(utf8ToInt(x)-96)==100
> f('buzzy')
[1] TRUE
> f('boycott')
[1] TRUE
> f('identifies')
[1] TRUE
> f('adiabatically')
[1] TRUE
> f('ttttt')
[1] TRUE
> f('zzz')
[1] FALSE
> f('zzzzzzz')
[1] FALSE
> f('abcdefghiljjjzz')
[1] FALSE
> f('tttt')
[1] FALSE
> f('basic')
[1] FALSE

```
> 3 votes

# Answer
# CJam, 9 bytes

```
q'`f-:+E=

```

Input should be in lowercase with a trailing newline. This is a tad cheaty as there's no reason to append a newline to the input, but it follows the rules as written.

Try it online!

### How it works

```
q         e# Read all input from STDIN and push the resulting string on the stack.
 '`       e# Push the backtick character.
   f-     e# Subtract the backtick character from each input character. The
          e# difference of two characters is the difference of their code points,
          e# so this maps a..z to 1..26 and the newline to -86.
     :+   e# Take the sum.
       E  e# Push 14.
        = e# Test the sum and 14 for equality.

```
> 3 votes

# Answer
# C++ (gcc), 45 bytes

Unnamed generic lambda, accepting `char[]`, `std::string` or any other container of `char` and returning via reference parameter.

* `0` means dollar word
* everything else is no dollar word

Even works for capital letters ;\>

```
[](auto&s,int&r){r=100;for(auto x:s)r-=x&31;}

```

Try it online!
> 3 votes

# Answer
# tinylisp, 56 bytes

```
(load library
(q((W)(e 100(s(sum(chars W))(*(strlen W)96

```

Anonymous function that takes a lowercase word (must be quoted, like `(q bernardino)`) and returns 1 for dollar words and 0 otherwise. Try it online!

Or, **53 bytes** if I can swap truthy and falsey (returns 0 for dollar words and some nonzero integer otherwise):

```
(load library
(q((W)(-(sum(chars W))100(*(strlen W)96

```

Try it online!

### Ungolfed/explanation

```
(load library)                 ; Needed for sum, *, strlen, and ungolfed aliases

(lambda (word)                 ; Anonymous function with one argument
  (equal? 100                  ; Is the following equal to 100?
    (sub2                      ; The difference of
      (sum (chars word))       ; the sum of the codepoints of the word
      (* (strlen word) 96))))  ; and 96 times the length of the word

```
> 3 votes

# Answer
# Factor \+ `math.unicode`, 19 bytes

```
[ 96 v-n Σ 100 = ]

```

Try it online!

## Explanation

```
       ! "boycott"
96     ! "boycott" 96
v-n    ! { 2 15 25 3 15 20 20 }
Σ      ! 100
100    ! 100 100
=      ! t

```
> 3 votes

# Answer
# PHP, 45 Bytes

combination 3 Bytes saved by @user63956

input as argument list

```
for(;$s+=ord($argv[++$i])%32?:die($s==100););

```

input as string using the `-R` option

```
for(;$s+=ord($argn[$i++])%32?:die($s==100););

```

# PHP, 48 Bytes

combination

```
for(;$c=$argv[++$i];)$s+=ord($c)%32;echo$s==100;

```

# PHP, 50 Bytes

Running PHP from the commandline without a file $argv\[0\] is "-"

prints 1 for true and nothing for false

lowercase

```
echo array_sum(array_map(ord,$argv))-96*$argc==49;

```

uppercase

```
echo array_sum(array_map(ord,$argv))-64*$argc==81;

```
> 2 votes

# Answer
# Java 7, ~~77~~ 74 bytes

```
boolean c(String s){int r=0;for(int c:s.getBytes())r+=c&31;return r==100;}

```

Case-insensitive thanks to *@Neil* by changing `c-96` to `c&31`.
-3 bytes thanks to *@SuperChafouin*.

**Explanation:**

Try it here.

```
boolean c(String s){          // Method with String parameter and boolean return-type
  int r=0;                    //  Resulting sum-integer
  for(int c:s.getBytes())     //  For each character in the String (as integer value)
    r+=c&31;                  //   Sum its alphabetic 1-indexed index (case-insensitive)
                              //  End of loop (implicit / single-line body)
  return r==100;              //  return if the sum equals 100
}                             // End of method

```
> 2 votes

# Answer
# jq, 28 characters

(25 characters code + 3 characters command line option)

```
[explode[]|.-96]|add==100

```

Sample run:

```
bash-4.3$ jq -R '[explode[]|.-96]|add==100' <<< 'bernardino'
true

```

On-line test
> 2 votes

# Answer
## C#, ~~72~~ 64 bytes

---

### Golfed

```
(string w)=>{int s=0;foreach(var c in w)s+=c-96;return s==100;};

```

---

### Ungolfed

```
( string w ) => {
   int s = 0;

   foreach( var c in w )
      s += c - 96;

   return s == 100;
};

```

---

### Ungolfed readable

```
( string w ) => {
   // Initialize the var to store the sum of the chars
   //    of the given word
   int s = 0;

   // Cycle through each char
   foreach( var c in w )

      // Add it to the sum minus 96
      //    'a' == 97
      s += c - 96;

   // Return if the sum is equal, or not, to 100
   return s == 100;
};

```

---

### Full code

```
using System;
using System.Collections.Generic;

namespace Namespace {
   class Program {
      static void Main( String[] args ) {
         Func<String, Boolean> f = ( string w ) => {
            int s = 0;

            foreach( var c in w )
               s += c - 96;

            return s == 100;
         };
         List<String>
            testCases = new List<String>() {
               "buzzy",
               "boycott",
               "identifies",
               "adiabatically",
               "ttttt",
               "zzz",
               "zzzzzzz",
               "abcdefghiljjjzz",
               "tttt",
               "basic",
            };

         foreach( String testCase in testCases ) {
            Console.WriteLine( $" Input: {testCase}\nOutput:{f( testCase )}\n" );
         }

         Console.ReadLine();
      }
   }
}

```

---

### Releases

* **v1.1** \- `-8 bytes` \- Swapped the `for` loop with a `foreach` one
* **v1.0** \- `72 bytes` \- Initial solution.

---

### Notes

* $
> 2 votes

# Answer
# braingasm, 20 bytes

Assumes input without trailing newlines, e.g `echo -n "unaltered" | braingasm dollarwords.bg`

```
,[96-[->+<],]>100-z:

```

Could easily been done in plain brainfuck, if I had the patience for it.

```
,                       Read a byte to the current cell.
 [                      While there's something in the current cell:
  96-                     subtract 96 from it,
     [->+<]               move the remainder to the next cell,
           ,              read another byte.
            ]
             >100-      Move to next cell and subtract 100 from it,
                  z:    print 1 if remainder is zero, 0 if not.

```
> 2 votes

# Answer
# Brain-Flak, 92 bytes

```
({{}[(((((()()()){}){}){}){}){}]})((((((()()()){}){}){}()){}){})({}[{}]<(())>){((<{}{}>))}{}

```

Try it online!
> 2 votes

# Answer
# Brachylog, ~~12~~ 9 bytes

*-3 bytes thanks to Fatalize*

```
ạ-₉₆ᵐ+100

```

Takes input as a string of lowercase letters. Try it online!

### Explanation

```
ạ          Convert input string to a list of ASCII codes
    ᵐ      To that list, map this predicate:
 -₉₆        Subtract 96 from each charcode
     +     Sum the resulting list of numbers 1-26
      100  Succeed if the sum is 100, fail otherwise

```
> 2 votes

# Answer
# Stax, 9 bytes

```
ü☺ïΦΘ╬╟₧╘

```

I love the ☺ in the code! Potential Stax/Emojicode polyglot in the future...?

Run and debug it at staxlang.xyz!

Unpacked (10 bytes):

```
{64-m|+AJ=

```

Explanation:

```
{   m         Form a block and map it over input.
 64-            Push 64 and subtract it from the character code.
     |+       Sum the resulting array.
       AJ     Push 10 and square it.
         =    Check for equality!

```

I'm quite new to Stax (and golfing languages); this can almost certainly be shortened. I think the `{` can probably be dropped with proper placement of the `m`...

### Another approach (imperative, 10 bytes):

```
ú☼7Tí:£_▓δ

```

12 unpacked:

```
c|+AJ-s%64*=
c               Copy the top item on the stack.
 |+             Sum it. For a string, this sums code points.
   AJ           Push 10 and square, yielding 100.
     -          Subtract this 100 from the earlier sum.
      s         Swap the top two items, putting the input back on top.
       %        Push the input's length.
        64*     Push 64 and multiply.
           =    Check for equality!

```

Input for both is capital letters. For lowercase, replace `64` with `96`.
> 2 votes

# Answer
# Rust, 158 bytes

```
fn main(){let(i,mut c)=(&mut"".into(),0);std::io::stdin().read_line(i);let l:Vec<u8>=i.trim().bytes().collect();for b in&l{c+=*b as u8-96}print!("{}",c==100)}

```

Ungolfed

```
fn main() {
    let (input_string, mut count) = (&mut "".into(), 0);
    std::io::stdin().read_line(input_string);
    let bytes: Vec<u8> = input_string.trim().bytes().collect();
    for byte in &bytes {
        count += *byte as u8 - 96;
    }
    print!("{}", count == 100);
}

```

Prints true if the input is a dollar word, and false if it is not. Only works on lower case letters.
> 2 votes

# Answer
# , 45 bytes

```
sum(as.numeric(charToRaw(scan(,"")))-96)==100

```

Try it online!

Returns `TRUE` or `FALSE`.

As stated in the question, expects user input in `a-z`, converts the characters to numbers, brings them to the 1–26 range, and checks if the sum is equal to 100.

Even if one converts it to a function, it still beats Giuseppe’s answer in terms of byte count (it would be 48):

```
function(x)sum(as.numeric(charToRaw(x))-96)==100

```
> 2 votes

# Answer
# TI-Basic, 53 bytes

```
ᴇ2=sum(seq(inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Ans,I,1)),I,1,length(Ans

```

Takes input in uppercase in `Ans`. Output is stored in `Ans` and displayed.
> 2 votes

# Answer
# BQN, ~~13~~ 12 bytes

*-1 byte thanks to Razetime*

```
100=0+´-⟜'`'

```

Anonymous tacit function that takes a lowercase string as its argument. Try it!

### Explanation

```
       -⟜'`'  Subtract ` from each character of the argument; gives list of numbers 1-26
    0+´       Fold on addition, starting at 0
100=          1 if the result equals 100, 0 otherwise

```
> 2 votes

# Answer
# Julia 1.0, 19 bytes

```
s->sum(s.-'`')==100

```

Try it online!

Takes input as an array of characters (since the question explicitly allows that).
> 2 votes

# Answer
# J 14 bytes or 10 bytes if rules allow!!!

```
100=+/_96+a.i.

        100=+/_96+a.i. 'identifies'
    1
        100=+/_96+a.i. 'ttttt'
    1
        100=+/_96+a.i. 'wrong'
    0

    Because:
                        a.i. gives position in code table 0-255
                    _96+ subtracts 96 ('a') from each value
                +/   adds them all together
            100= compares with 100

```

IDEA: Can a "truthy" value be 100, and a "falsey value be \<\> 100?

If so...

```
+/_96+a.i.

    +/_96+a.i. 'boycott'
    100
    +/_96+a.i. 'boycot'
    80

```

:O)
> 1 votes

# Answer
# Groovy, 32 characters

```
{s->s*.value.sum{it[0]-96}==100}

```

Sample run:

```
groovy:000> ({s->s*.value.sum{it[0]-96}==100}("bernardino"))
===> true

```
> 1 votes

# Answer
# Ruby 2.4, 30 + 1 = 31 bytes

One extra byte for the `n` flag: `$ ruby -n dollar_words.rb`

```
p chop.bytes.sum{|c|c-96}==100

```

Prints `true` or `false` for each given line of input:

```
$ ruby -n dollar_words.rb
zzzzz
false
unaltered
true
dollar
false

```
> 1 votes

# Answer
## QBIC, 34 bytes

```
;[_lA||p=p+asc(_sA,a,1|)%32]?p=100

```

Explanation:

```
;               Get A$ from the cmd-line
[_lA||          FOR a = 0; a <= a$.Length(); a++
p=p+asc(        Increment P with the ASCII value of
_sA,a,1|)%32]     A$.Substring(a,1) mod 32 (thank you @JonathanAllan, that's a neat trick!)
?p=100          When done, print -1 if p is 100, 0 otherwise

```
> 1 votes

# Answer
# Pyth, 16

```
!-100+Fm+1xGdcQ1

```

Try online.
> 1 votes

# Answer
# Röda, 25 bytes

```
{[ord(_)-96]|sum|[_=100]}

```

Try it online!
> 1 votes

# Answer
## Batch, 189 bytes

```
@set/p,=
@set z=1
@for %%a in (a b c d e f g h i j k l m n o p q r s t u v w z y)do @set/a%%a=z,z+=1
@set .=100
:l
@set/a.-=%,:~,1%
@set ,=%,:~1%
@if not "%,%"=="" goto l
@exit/b%.%

```

Takes lowercase input on STDIN and ouputs via ERRORLEVEL (0 is truthy). Batch has no character code operator so I set the variables a-z to their value in a loop, then I individually evaluate all the characters in the input word and subtract them all from 100.

By using non-alphabetic variable names the code is readily extended to handle uppercase input.
> 1 votes

# Answer
# Pyth, 9 bytes

```
q100smhxG

```

Explanation:

```
q100smhxGdQ autofill variables
       xGd  [index of d in "abcdefghijklmnopqrstuvwxyz"
      h      + 1
     m    Q  for d in eval(input())]
    s       sum(^)
q100        == 100

```

Test suite.
> 1 votes

# Answer
# Excel, 52 + 2 bytes

```
{=SUM(IFERROR(CODE(MID(A1,ROW(A1:A100),1))-64,0))=100}

```

Input is in cell `A1` in all uppercase.
Must be entered as an array formula with `Ctrl`+`Shift`+`Enter` (Adds the curly brackets `{ }`).
Returns `TRUE` for dollar words and `FALSE` for others.
> 1 votes

# Answer
# Rip, 27 bytes

```
10gDiW[8DmsagDi]P9iDmsI[d]O

```

Works only for uppercase input, which it reads from stdin. Please do not end the input with a newline. :)

Explanation:

```
1                            0I[Push a 1 for later]
 0                           0I[Sum is 0 now]
  gDiW[                      0I[Getchar, duplicate, increment, while: while not EOF]
       8Dms                  0I[8 8 dup mul subtract: subtract 65]
           a                 0I[Add to the current total]
            gDi]             0I[Getchar, dup, increment, end while: while not EOF]
                P            0I[Pop the last -1 (=EOF) read]
                 9iDms       0I[Subtract 100 (9 incr dup mul subtract)]
                      I[d]   0I[If not zero, decrement the first 1 (see first line) to a 0]
                          O  0I[Output the result (1 if ==100, 0 else) as a number]

```
> 1 votes

# Answer
## C# / Linq, 42 bytes

Is Linq cheating?

```
(string w)=>{return w.Sum(x=>x-96)==100;};

```
> 1 votes

# Answer
# Braingolf, 13 bytes \[non.competing\]

```
{#`-}&+#de1:0

```

Try it online!

Requires all lowercase input, outputs 1 for dollar word, 0 otherwise

### Explanation

```
{#`-}&+#de1:0  Implicit input of string as char values to stack
{...}          Foreach item on stack..
 #`            ..Push char value of ` (96)
   -           ..Subtract from input char value
     &+        Sum entire stack
       #d      Push char value of d (100)
         e     If last 2 items are equal..
          1    ..Push 1
           :   else
            0  ..Push 0
               Implicit output of last item on stack

```
> 1 votes

# Answer
# Proton, 32 bytes

```
map(ord+((-)&96))+sum+((==)&100)

```

Try it online!

Waiting for pull from TIO.
> 1 votes

# Answer
# Perl 5, 28 + 1 (-p) = 29 bytes

```
s/./96-ord$&/ge;$_=-100^eval

```

Try it online!

Returns 0 for truthy, anything else for falsey. Assumes lowercase input.

**How?**

Replace each character with the additive inverse of its position in the alphabet. Then, evaluate that equation and XOR it with -100 to determine if this is a dollar word.
> 1 votes

# Answer
# Common Lisp, 56 bytes

```
(=(loop as x across(read-line)sum(-(char-code x)96))100)

```

Try it online!
> 1 votes

# Answer
# SmileBASIC, 48 bytes

```
INPUT W$WHILE""<W$D=D+ASC(POP(W$))-64WEND?D==100

```

The classic string eating loop.
> 1 votes

# Answer
## Pyth, 15 bytes

```
Vz=+ZhxGN)qZ^T2

```

Try it online!

The other Pyth answers use `Q=eval(input())`, which means the input must be in quotes in order to be valid. This program does not have that stipulation.

Pyth (indented) | Python 3 (translation)
```
             | G="abcdefghijklmnopqrstuvwxyz"
             | T=10
             | Z=0
             | z=input()
Vz           | for N in z:
    =+ZhxGN) |     Z+=G.find(N)+1
qZ^T2        | print(Z==T**2)

```
> 1 votes

# Answer
# Befunge-98, ~~14~~ 13 bytes

```
+~'@ #.-"d"$#

```

Try it online!

Takes input as uppercase letters. Outputs 0 for truthy, any other number for falsey.

### How It Works:

```
 ~          Get input and continue right.
+ '@   -    Subtract 64 from the letter and add it to the total
 ~          On EOF go left instead
       -"d" Subtract 100 from the total
   @  .     Print the value and end the program

```
> 1 votes

# Answer
# Pip, 11 bytes

```
A_-96MSa==h

```

Takes a string of lowercase letters as a command-line argument. Try it online!

### How it works

```
             a is 1st command-line arg; h is 100 (implicit)
A_           An anonymous function that takes the ASCII value of its argument
  -96        and subtracts 96
     MSa     Map that to the characters of a and sum the result
        ==h  Test if that's equal to 100
             The result (0 or 1) is autoprinted

```

We use `==` (exact equality) instead of the usual `=` (numeric equality) because it has lower precedence than `MS`.
> 1 votes

# Answer
# Add++, 18 bytes

```
D,f,@~,€O96€_s100=

```

Try it online!
> 1 votes

# Answer
# Julia 0.6, 27 bytes

```
s->sum(c->Int(c)-96,s)==100

```

Try it online!
> 1 votes

# Answer
# Tcl, 70 bytes

```
puts [expr 100==[join [lmap c [split $argv ""] {scan $c %c}] -96+]-96]

```

Try it online!

---

# Tcl, 71 bytes

```
proc D s {expr 100==[join [lmap c [split $s ""] {scan $c %c}] -96+]-96}

```

Try it online!

---

# Tcl, 74 bytes

```
puts [expr 100==[join [lmap c [split $argv ""] {expr [scan $c %c]-96}] +]]

```

Try it online!

Saved a byte using a command line argument instead of a function.

---

# Tcl, 75 bytes

```
proc D s {expr 100==[join [lmap c [split $s ""] {expr [scan $c %c]-96}] +]}

```

Try it online!
> 1 votes

# Answer
# Kotlin, 23 bytes

```
{it.sumBy{it-'`'}==100}

```

Try it online!
> 1 votes

# Answer
# Ahead, 21 bytes

```
>jvi96-+v
^~>'d=O~<~@

```

Try it online!
> 1 votes

# Answer
# Attache, 20 bytes

```
{100=Sum[_-96]}@Ords

```

Try it online!

## Explanation

```
{100=Sum[_-96]}@Ords
               @Ords    convert input to ordinates
{             }         anonymous lambda, input: _
         _-96           subtract 96 from each char
     Sum[    ]          take the sum
 100=                   is it equal to 100?

```

## Alternatives

**20 bytes:** `{100=Sum[Ords@_-96]}`

**21 bytes:** `100&`=@Sum@`-&96@Ords`

**22 bytes:** `{100=_}@Sum@`-&96@Ords`

**22 bytes:** `{100=Sum@_}@`-&96@Ords`

**24 bytes:** `{100=Sum!-~_}##STN=>List`

**25 bytes:** `{100-#_=Sum@_}##STN=>List`

**25 bytes:** `{100=Sum[_+1]}##STN=>List`

**26 bytes:** `{100=Sum[_+1]}##STN=>Chars`

**26 bytes:** `100&`=@Sum##Succ@STN=>List`

**27 bytes:** `{100=_}@Sum##Succ@STN=>List`
> 1 votes

# Answer
# F# (Mono), 38 bytes

```
fun s->Seq.sumBy(fun c->int c-96)s=100

```

Try it online!
> 1 votes

# Answer
# Vyxal, 6 bytes

```
C₆-∑₁=

```

Try it Online!

A port of the GS2 answer. Requires input to be uppercase (7 bytes for lowercase)

## Explained

```
C₆-∑₁=  # Full program - takes single string S
C       # push [ord(char) for char in S]
 ₆-     # and subtract 64 from each
   ∑    # and get the sum of that.
    ₁=  # does that equal 100?

```
> 1 votes

# Answer
# Ly, 12 bytes

```
iy'`*N&+'d-!

```

Try it online!

Take input as lowercase characters.

```
i             - read input to stack as codepoints
 y            - push number of chars on stack
  '`          - push codepoint("a")-1 on stack
    *N        - multiple, flip sign
      &+      - sum the stack
        'd    - push 100 (codepoint for "d") on the stack
          -   - subtract from sum
           !  - "not" to map 0 to 1 and anything else to 0, prints automatically

```
> 1 votes

# Answer
# MathGolf, 6 bytes

```
$♥%Σ♀=

```

Input as a list of characters. Input casing is irrelevant; can be lower-, upper-, or even mixed cased.

Try it online.

**Explanation:**

```
$      # Convert each character in the (implicit) input-list to a codepoint-integer
 ♥%    # Modulo-32 on each
   Σ   # Sum the list together
    ♀= # And check if it's equal to 100
       # (after which the entire stack is output implicitly as result)

```
> 1 votes

# Answer
# Whitespace, ~~105~~ 104 bytes

```
[S S S N
_Push_0][N
S S N
_Create_Label_LOOP][S N
S _Duplicate_sum][S N
S _Duplicate_sum][S N
S _Duplicate_sum][T N
T   S _Read_STDIN_as_Character][T   T   T   _Retrieve_input][S N
S _Duplicate_input][S S S T S T S N
_Push_10][T S S T   _Subtract][N
T   S S N
_If_0_Jump_to_Label_PRINT][S S S T  S S S S S N
_Push_32][T S T T   _Modulo][T  S S S _Add][N
S N
N
_Jump_to_Label_LOOP][N
S S S N
_Create_Label_PRINT][S N
S _Duplicate_10][T  S S N
_Multiply][T    S S T   _Subtract][S N
S _Duplicate][N
T   S T N
_If_0_Jump_to_Label_TRUTHY][S S T   T   N
_Push_-1][N
S S T   N
_Create_Label_TRUTHY][T N
S T _Print_as_integer]

```

Letters `S` (space), `T` (tab), and `N` (new-line) added as highlighting only.
`[..._some_action]` added as explanation only.

Input casing is irrelevant; can be lower-, upper-, or even mixed cased.
Since Whitespace can only read input one character at a time, the input must contain a trailing newline so we'll know when we're done reading characters.
Whitespace also lacks truthy/falsey values, so this program will output `0` for truthy and `-1` for falsey (could be 5 bytes less with `0` as truthy and any other integer as falsey).

**Try it online** (with raw spaces, tabs and new-lines only).

**Explanation in pseudo-code:**

```
Integer sum = 0
LOOP:
  Integer c = STDIN as character-codepoint
  If(c == '\n'):
    Jump to PRINT
  c = c modulo-32
  sum = sum + c
  Jump to LOOP

PRINT:
  If(sum == c*c):   // Note: c=10 at this point, which is the codepoint for '\n'
    Integer result = 0
    Jump to TRUTHY
  result = -1
  TRUTHY:
    Print result as integer to STDOUT

```
> 1 votes

# Answer
# APOL, 33 bytes

`v(0);f(i ∆(0 +(⌕(ⓛ ∋) 1)));=(⁰ ô)`
> 1 votes

# Answer
# Batch 210 bytes

```
@Set i=%1&set/A$=}=0&Setlocal Enabledelayedexpansion&@For /l %%i in (97 1 123)Do @Cmd/C Exit %%i&Set/A"!=exitcodeASCII!}=%%i-96"
@For /l %%i in (0 1 99)Do @Set/A$+=!i:~%%i,1!}
@If !$!==100 (Echo(1)Else Echo(0

```

Defines a group of associated variables for each character containing the appropriate cent value. iterates over the string incrementing by the cent value of the current character. } is used to associate the variables, and also is defined as a variable with zero value to prevent missing operator errors if the current index exceeds the strings length. Iterates to a string length of 100 characters seeing as 100 A's is the longest possible dollar "word"

Edit: input is via command line argument when executing from cmd.exe
> 1 votes

# Answer
Old solution:

# Python 3, 38 bytes

```
lambda s:sum(ord(c)-96for c in s)==100

```

Try it online!

Realized that was a duplicate so...

# Python 3, 42 bytes

```
lambda s:sum(n-96for n in map(ord,s))==100

```

Try it online!
> 1 votes

# Answer
# Thunno 2, 4 bytes

```
ÄSɦ=

```

Attempt This Online!

#### Explanation

```
ÄSɦ=  # Implicit input
Ä     # Alphabet to number
 S    # Sum the list
   =  # Equals
  ɦ   # 100?
      # Implicit output

```
> 1 votes

---
Tags: code-golf, string
---