答:
PowerShell v2+, 81 bytes

```<code>param($n)while($n-gt2){$n-=(($n-1)..2|?{'1'*$_-match'^(?!(..+)\1+$)..'})[0]}!--$n
</code>```

Takes input $n. Enters a while loop so long as $n is still 3 or greater. Each iteration, subtracts a number from $n. The number is  the results of the regex primality test applied against a range ($n-1)..2 via the Where-Object (?) operator, then the first [0] of the results (since the range is decreasing, this results in the largest one being selected). After concluding the loop, $n is either going to be 1 or 2, by definition, so we pre-decrement $n (turning it into either 0 or 1), and take the Boolean-not ! thereof. That's left on the pipeline and output is implicit.

Examples

```<code>PS C:\Tools\Scripts\golfing> 3..20|%{"$_ --> "+(.\can-the-number-reach-one.ps1 $_)}
3 --> True
4 --> True
5 --> False
6 --> True
7 --> False
8 --> True
9 --> False
10 --> True
11 --> True
12 --> True
13 --> False
14 --> True
15 --> False
16 --> True
17 --> True
18 --> True
19 --> False
20 --> True
</code>```

Title: Can the number reach 1 by repeatedly subtracting the largest prime less than it?

Body:
Challenge:

Given a number, take the largest prime strictly less than it, subtract it from this number, do this again to this new number with the biggest prime less than it, and continue doing this until it's less than 3. If it reaches 1, your program should output a truthy value, else, the program should output a falsey value.

Examples:

All of these should give a truthy value:

```<code>3
4
6
8
10
11
12
14
16
17
18
20
22
23
24
26
27
29
30
32
34
35
37
38
40
41
42
44
46
47
48
50
</code>```

All of these should give falsey values:

```<code>5
7
9
13
15
19
21
25
28
31
33
36
39
43
45
49
</code>```

Rules:

You can either write a program or function.

You can assume that the input is bigger than 2.

Standard loopholes apply

This is code-golf so the shortest answer wins!

Body:
PowerShell v2+, 81 bytes

param($n)while($n-gt2){$n-=(($n-1)..2|?{'1'*$_-match'^(?!(..+)\1+$)..'})[0]}!--$n

Takes input $n. Enters a while loop so long as $n is still 3 or greater. Each iteration, subtracts a number from $n. The number is  the results of the regex primality test applied against a range ($n-1)..2 via the Where-Object (?) operator, then the first [0] of the results (since the range is decreasing, this results in the largest one being selected). After concluding the loop, $n is either going to be 1 or 2, by definition, so we pre-decrement $n (turning it into either 0 or 1), and take the Boolean-not ! thereof. That's left on the pipeline and output is implicit.

Examples

PS C:\Tools\Scripts\golfing> 3..20|%{"$_ --> "+(.\can-the-number-reach-one.ps1 $_)}
3 --> True
4 --> True
5 --> False
6 --> True
7 --> False
8 --> True
9 --> False
10 --> True
11 --> True
12 --> True
13 --> False
14 --> True
15 --> False
16 --> True
17 --> True
18 --> True
19 --> False
20 --> True


问:
There can be only 1!
Your task is, given a positive integer n, to generate an expression that equals the number n.

The catch is: you're only allowed the number 1 in the output.

The operators at your disposal are:

+, -, * and /

/ is floating-point division (so 5/2 = 2.5).

sqrt (as s)

ceil and floor (as c and f respectively)

! (factorial)

The factorial, in this case, only works for positive integers.

You are also allowed to stack 1's together, so something like 11 is acceptable in the output. However, they count as the same number of 1's that's in the number (so 11 counts as 2 1's).

You must also include brackets in the output, so that the expression in the output, when executed through the order of operations, will result in the input.
They do not count as operations, though.

Examples:

Input = 24, one possible output = (1+1+1+1)!

Input = 11, one possible output = 11

Input = 5, one possible output = c(s((1+1+1+1)!))

The ceiling of the square root of 24 is 5.

Rules:

You are guaranteed that the input is a positive integer from 1 to 2^31-1.

Your program must work for any positive integer up to 2^31-1, even if they are not tested.

Your program must finish processing all outputs for all numbers in the set in 1 hour.

The results for every run of the program must be exactly the same - also, no seeds.

You are only allowed to hardcode the expressions for a maximum of 10 numerical values.

You are not allowed to have imaginary numbers anywhere in the output (so no s(some negative number)).

You are also not allowed to have numbers larger than 2^31-1 or smaller than -2^31+1 anywhere in the output, even when they are sqrted or /ed (so no (((1+1+1)!)!)! or ((1+1+1+1)!)!).

Set of Numbers:

```<code>945536, 16878234, 32608778, 42017515, 48950830, 51483452, 52970263, 54278649, 63636656, 78817406, 89918907, 90757642, 95364861, 102706605, 113965374, 122448605, 126594161, 148064959, 150735075, 154382918, 172057472, 192280850, 194713795, 207721209, 220946392, 225230299, 227043979, 241011012, 248906099, 249796314, 250546528, 258452706, 276862988, 277140688, 280158490, 286074562, 308946627, 310972897, 322612091, 324445400, 336060042, 346729632, 349428326, 352769482, 363039453, 363851029, 392168304, 401975104, 407890409, 407971913, 425780757, 459441559, 465592122, 475898732, 482826596, 484263150, 506235403, 548951531, 554295842, 580536366, 587051904, 588265985, 588298051, 590968352, 601194306, 607771869, 618578932, 626776380, 667919873, 681786366, 689854904, 692055400, 697665495, 711608194, 734027104, 750869335, 757710567, 759967747, 777616154, 830071127, 833809927, 835873060, 836438554, 836945593, 863728236, 864158514, 871273503, 881615667, 891619600, 897181691, 918159061, 920521050, 924502226, 929983535, 943162304, 950210939, 950214176, 962610357, 974842859, 988572832
</code>```

(These are 100 random numbers from 1 to 1 billion.)

Scoring System:

Your score is determined like so:

Your program will be tested against the random numbers in the set.

You must provide the output generated using the random numbers in the set (either inside your answer or as a pastebin link).

Your then have two "scores": A primary score and a secondary score.

Your primary score is (no. of 1's in output)*(no. of operators in output). If your primary score is the lowest, you win.

Your secondary score is the time of your upload, in GMT, and in 24-hour time. So, if you upload your program on September 12th, 00:00 GMT, then your score is 12/09/2016, 00:00 (use DD/MM/YYYY HH:MM for your formatting).

Display your score like so:

```<code>(language name)
Primary Score = (primary score)
Secondary Score = (secondary score)
(no. of 1's) `1`'s, (no. of operators) operators
</code>```

Replace all the things in the brackets with your language name, primary score and secondary score respectively.

Current Winner:

The current winner is @ChrisJefferson, who has a primary score of 3,810,660.

ContentLicense: CC BY-SA 3.0

Title: There can be only 1!

Body:
JAVA

Primary Score 1045978739

Secondary score      12/09/2016 16:05

37193  1s

28123  operators

     void main() {

    int arr[]={945536, 16878234, 32608778, 42017515, 48950830, 51483452, 52970263, 54278649, 63636656, 78817406, 89918907, 90757642, 95364861, 102706605, 113965374, 122448605, 126594161, 148064959, 150735075, 154382918, 172057472, 192280850, 194713795, 207721209, 220946392, 225230299, 227043979, 241011012, 248906099, 249796314, 250546528, 258452706, 276862988, 277140688, 280158490, 286074562, 308946627, 310972897, 322612091, 324445400, 336060042, 346729632, 349428326, 352769482, 363039453, 363851029, 392168304, 401975104, 407890409, 407971913, 425780757, 459441559, 465592122, 475898732, 482826596, 484263150, 506235403, 548951531, 554295842, 580536366, 587051904, 588265985, 588298051, 590968352, 601194306, 607771869, 618578932, 626776380, 667919873, 681786366, 689854904, 692055400, 697665495, 711608194, 734027104, 750869335, 757710567, 759967747, 777616154, 830071127, 833809927, 835873060, 836438554, 836945593, 863728236, 864158514, 871273503, 881615667, 891619600, 897181691, 918159061, 920521050, 924502226, 929983535, 943162304, 950210939, 950214176, 962610357, 974842859, 988572832

};
    int sum=1;
    for(int i=0;i<arr.length;i++){
    System.out.print(arr[i]+":");
        while(arr[i]>11){
            System.out.print("("+"1");
            sum=11;
            while(sum<=arr[i]){
            if(sum<=arr[i])
            System.out.print("*11");
            sum*=11;
        }
        arr[i]=arr[i]-sum/11;
        System.out.print(")");
        if(arr[i]!=0)
        System.out.print("+");

        }
        while(arr[i]--!=0){
        System.out.print(1);
        if(arr[i]!=0)
            System.out.print("+");
    }

        System.out.println();

    }
    }

945536:(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1
16878234:(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1+1
32608778:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+1+1+1+1
42017515:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+1
48950830:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1
51483452:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+1+1+1+1+1+1+1+1+1
52970263:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1
54278649:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1
63636656:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1
78817406:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1
89918907:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1
90757642:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+1+1+1+1+1+1+1+1
95364861:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1
102706605:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1
113965374:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1
122448605:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1
126594161:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1
148064959:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1
150735075:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1
154382918:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1
172057472:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1
192280850:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1
194713795:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1
207721209:(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11)+(1*11)+1+1+1
220946392:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+1+1+1+1+1+1+1+1+1
225230299:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1+1
227043979:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1+1
241011012:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1
248906099:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+1+1+1+1
249796314:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1+1+1
250546528:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1
258452706:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1
276862988:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1
277140688:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1
280158490:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1+1+1+1
286074562:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1
308946627:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1
310972897:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1
322612091:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1
324445400:(1*11*11*11*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+(1*11)+1+1+1+1+1+1


问:
Is it a Bumpy Word?
(inspired by this challenge over on Puzzling -- SPOILERS for that puzzle are below, so stop reading here if you want to solve that puzzle on your own!)

If a letter in a word occurs alphabetically later than the previous letter in the word, we call that a rise between the two letters. Otherwise, including if it's the same letter, it's called a fall.

For example, the word ACE has two rises (A to C and C to E) and no falls, while THE has two falls (T to H and H to E) and no rises.

We call a word Bumpy if the sequence of rises and falls alternates. For example, BUMP goes rise (B to U), fall (U to M), rise (M to P). Note that the first sequence need not be a rise -- BALD goes fall-rise-fall and is also Bumpy.

The challenge

Given a word, output whether or not it's Bumpy.

Input

A word (not necessarily a dictionary word) consisting of ASCII alphabet ([A-Z] or [a-z]) letters only, in any suitable format.

Your choice if the input is all uppercase or all lowercase, but it must be consistent.

The word will be at least 3 characters in length.

Output

A truthy/falsey value for whether the input word is Bumpy (truthy) or not Bumpy (falsey).

The Rules

Either a full program or a function are acceptable.

Standard loopholes are forbidden.

This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

Examples

Truthy:

```<code>ABA
ABB
BAB
BUMP
BALD
BALDY
UPWARD
EXAMINATION
AZBYCXDWEVFUGTHSIRJQKPLOMN
</code>```

Falsey:

```<code>AAA
BBA
ACE
THE
BUMPY
BALDING
ABCDEFGHIJKLMNOPQRSTUVWXYZ
</code>```

Leaderboards

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

var QUESTION_ID=93005,OVERRIDE_USER=42963;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
Ruby, <s>57</s> 48 bytes

Expects input to be all uppercase.

```<code>->s{!s.gsub(/.(?=(.)(.))/){($&<$1)^($1<$2)}[?f]}
</code>```

See it on repl.it: https://repl.it/D7SB

Explanation

The regular expression /.(?=(.)(.))/ matches each character that's followed by two more characters. (?=...) is a positive lookahead, meaning we match the subsequent two characters but don't "consume" them as part of the match. Inside the curly braces, $& is the matched text—the first character of the three—and $1 and $2 are the captured characters inside the lookahead. In other words, if the string is "BUMPY", it will first match "B" (and put it in $&) and capture "U" and "M" (and put them in $1 and $2). Next it will match "U" and capture "M" and "P", and so on.

Inside the block we check if the first pair of characters ($& and $1) is a rise and the second ($1 and $2) is a fall or vice versa, much like most of the other answers. This ^ expression returns true or false, which gets converted to a string and inserted in place of the match. As a result, our example "BUMPY" becomes this:

```<code>"truetruefalsePY"
</code>```

Since we know the input is all uppercase, we know "f" will only occur as part of "false" and !result[?f] gives us our answer.

Title: Is it a Bumpy Word?

Body:
Ruby, <s>57</s> 48 bytes

Expects input to be all uppercase.

->s{!s.gsub(/.(?=(.)(.))/){($&<$1)^($1<$2)}[?f]}

See it on repl.it: https://repl.it/D7SB

Explanation

The regular expression /.(?=(.)(.))/ matches each character that's followed by two more characters. (?=...) is a positive lookahead, meaning we match the subsequent two characters but don't "consume" them as part of the match. Inside the curly braces, $& is the matched text—the first character of the three—and $1 and $2 are the captured characters inside the lookahead. In other words, if the string is "BUMPY", it will first match "B" (and put it in $&) and capture "U" and "M" (and put them in $1 and $2). Next it will match "U" and capture "M" and "P", and so on.

Inside the block we check if the first pair of characters ($& and $1) is a rise and the second ($1 and $2) is a fall or vice versa, much like most of the other answers. This ^ expression returns true or false, which gets converted to a string and inserted in place of the match. As a result, our example "BUMPY" becomes this:

"truetruefalsePY"

Since we know the input is all uppercase, we know "f" will only occur as part of "false" and !result[?f] gives us our answer.


答:
PowerShell v2+, 83 bytes

```<code>param($n)($a=-join(1..($n.Length-1)|%{+($n[$_-1]-lt$n[$_])}))-eq($a-replace'00|11')
</code>```

A little bit of a different approach. This loops through the input $n, each iteration seeing whether the previous character $n[$_-1] is -lessthan the current character $n[$_], then casting the result of that Boolean operator to an int with +. Those are -joined together into a string, stored into $a. We then check whether $a is -equal to $a with any substrings of 00 or 11 removed.

Title: Is it a Bumpy Word?

Body:
(inspired by this challenge over on Puzzling -- SPOILERS for that puzzle are below, so stop reading here if you want to solve that puzzle on your own!)

If a letter in a word occurs alphabetically later than the previous letter in the word, we call that a rise between the two letters. Otherwise, including if it's the same letter, it's called a fall.

For example, the word ACE has two rises (A to C and C to E) and no falls, while THE has two falls (T to H and H to E) and no rises.

We call a word Bumpy if the sequence of rises and falls alternates. For example, BUMP goes rise (B to U), fall (U to M), rise (M to P). Note that the first sequence need not be a rise -- BALD goes fall-rise-fall and is also Bumpy.

The challenge

Given a word, output whether or not it's Bumpy.

Input

A word (not necessarily a dictionary word) consisting of ASCII alphabet ([A-Z] or [a-z]) letters only, in any suitable format.

Your choice if the input is all uppercase or all lowercase, but it must be consistent.

The word will be at least 3 characters in length.

Output

A truthy/falsey value for whether the input word is Bumpy (truthy) or not Bumpy (falsey).

The Rules

Either a full program or a function are acceptable.

Standard loopholes are forbidden.

This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

Examples

Truthy:

```<code>ABA
ABB
BAB
BUMP
BALD
BALDY
UPWARD
EXAMINATION
AZBYCXDWEVFUGTHSIRJQKPLOMN
</code>```

Falsey:

```<code>AAA
BBA
ACE
THE
BUMPY
BALDING
ABCDEFGHIJKLMNOPQRSTUVWXYZ
</code>```

Leaderboards

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

var QUESTION_ID=93005,OVERRIDE_USER=42963;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Body:
PowerShell v2+, 83 bytes

param($n)($a=-join(1..($n.Length-1)|%{+($n[$_-1]-lt$n[$_])}))-eq($a-replace'00|11')

A little bit of a different approach. This loops through the input $n, each iteration seeing whether the previous character $n[$_-1] is -lessthan the current character $n[$_], then casting the result of that Boolean operator to an int with +. Those are -joined together into a string, stored into $a. We then check whether $a is -equal to $a with any substrings of 00 or 11 removed.


问:
Make me a bad fade animation... please
Your task is to, as the title discreetly suggests, make a bad fade animation of one word turning into a second word for yours truly.

What exactly is this "fade animation" you may ask?

To make a spectacular(ly bad) fade animation, you take two strings which will contain only printable ASCII characters. You start by printing your starting string (the first of the two). Then, you randomly pick a character in the original word and change it to the corresponding character in the word you want to animate to. When the words are of unequal length, you must pad them with spaces.

You keep on doing this until all of the characters have been changed, but you will not change the character at a certain index more than once. Here is an example i/o:

```<code>Hey -> Peeps
Hey    # original string
Hey s  # replace char at index 4
Hey s  # replace char at index 1
Pey s  # replace char at index 0
Pee s  # replace char at index 2
Peeps  # replace char at index 3
</code>```

You must write a function or full program that changes a letter and then prints the new string at increments of one second. The input format is loose, but the output format is strict.

This is code-golf, so shortest code in bytes wins.

Some test cases (Form: init -> final):

```<code>Stringy -> Blingy
Banana -> Republic
United -> States
Make America -> Tissue box
I like walls -> I have small hands
Hello, -> world!
</code>```

Reference implementation in Python 2:

```<code>import random
import time
def F(c,f):
    print c                                      # before we do stuff
    if len(c)>len(f):f+=" "*(len(c)-len(f))      # add padding part 1
    if len(f)>len(c):c+=" "*(len(f)-len(c))      # add padding part 2
    c, f = list(c), list(f)
    ai = [i for i in range(len(c))]              # a list for keeping track
    while len(ai) > 0:                           #  of available indices
        time.sleep(1)                            # 1 second pause...
        i = ai.pop(random.randint(0,len(ai)-1))  # get a random index and remove
        c[i] = f[i]                              #   it from the list
        print ''.join(c)                         # print the new string
</code>```

答:
CJam, 44 bytes

```<code>q~{_,@\Se]s}2*1$peemr{es{_es-zA3#<}g;~t_p}/;
</code>```

Explanation:

```<code>q~                                            get input
  {_,@\Se]s}2*                                pad each string to the length of the other
              1$p                             print starting string
                 eemr{                   }/   for each randomly shuffled enum of target string
                      es{_es-zA3#<}g;         1 second waiting loop
                                     ~t_p     replace one character and print new string
                                           ;  clear stack
</code>```

The delay only works using the Java interpreter, not in the online interpreter.

```<code> java -jar cjam.jar badfade.cjam <<< '"banana" "republic"'
</code>```

Try it online (delay set to 1 ms)

Title: Make me a bad fade animation... please

Body:
CJam, 44 bytes

q~{_,@\Se]s}2*1$peemr{es{_es-zA3#<}g;~t_p}/;

Explanation:

q~                                            get input
  {_,@\Se]s}2*                                pad each string to the length of the other
              1$p                             print starting string
                 eemr{                   }/   for each randomly shuffled enum of target string
                      es{_es-zA3#<}g;         1 second waiting loop
                                     ~t_p     replace one character and print new string
                                           ;  clear stack

The delay only works using the Java interpreter, not in the online interpreter.

 java -jar cjam.jar badfade.cjam <<< '"banana" "republic"'

Try it online (delay set to 1 ms)


问:
How long is a Welsh word?
Write a program or function which receives as input a string representing a Welsh word (UTF-8 unless otherwise specified by you).

The following are all single letters in Welsh:

a, b, c, ch, d, dd, e, f, ff, g, ng, h, i, j, l, ll, m, n, o, p, ph, r, rh, s, t, th, u, w, y

To quote Wikipedia,

While the digraphs ch, dd, ff, ng, ll, ph, rh, th are each written with two symbols, they are all considered to be single letters. This means, for example that Llanelli (a town in South Wales) is considered to have only six letters in Welsh, compared to eight letters in English.

These letters also exist in Welsh, though they are restricted to technical vocabulary borrowed from other languages:

k, q, v, x, z

Letters with diacritics are not regarded as separate letters, but your function must accept them and be able to count them. Possible such letters are:

â, ê, î, ô, û, ŷ, ŵ, á, é, í, ó, ú, ý, ẃ, ä, ë, ï, ö, ü, ÿ, ẅ, à, è, ì, ò, ù, ẁ

(This means that ASCII is not an acceptable input encoding, as it cannot encode these characters.)

Notes:

This is code golf.

You do not have to account for words like llongyfarch, in which the ng is not a digraph, but two separate letters. This word has nine letters, but you can miscount it as eight. (If you can account for such words, that's kind of awesome, but outside the scope of this challenge.)

The input is guaranteed to have no whitespace (unless you prefer it with a single trailing newline (or something more esoteric), in which case that can be provided). There will certainly be no internal whitespace.

Test cases:

Llandudno, 8

Llanelli, 6

Rhyl, 3

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch, 50 (really 51, but we'll count 50)

Tŷr, 3

Cymru, 5

Glyndŵr, 7

答:
JavaScript (ES6), 44 bytes

```<code>x=>x.match(/[cprt]h|dd|ff|ng|ll|./gi).length
</code>```

The trivial answer may be the shortest.

Title: How long is a Welsh word?

Body:
JavaScript (ES6), 44 bytes

x=>x.match(/[cprt]h|dd|ff|ng|ll|./gi).length

The trivial answer may be the shortest.


答:
Python 3, 64 bytes

import re
print(len(re.findall("[cprt]h|dd|ff|ng|ll|.",input())))
```

Uses regex again

Ideone it!

Title: How long is a Welsh word?

Body:
Write a program or function which receives as input a string representing a Welsh word (UTF-8 unless otherwise specified by you).

The following are all single letters in Welsh:

a, b, c, ch, d, dd, e, f, ff, g, ng, h, i, j, l, ll, m, n, o, p, ph, r, rh, s, t, th, u, w, y

To quote Wikipedia,

While the digraphs ch, dd, ff, ng, ll, ph, rh, th are each written with two symbols, they are all considered to be single letters. This means, for example that Llanelli (a town in South Wales) is considered to have only six letters in Welsh, compared to eight letters in English.

These letters also exist in Welsh, though they are restricted to technical vocabulary borrowed from other languages:

k, q, v, x, z

Letters with diacritics are not regarded as separate letters, but your function must accept them and be able to count them. Possible such letters are:

â, ê, î, ô, û, ŷ, ŵ, á, é, í, ó, ú, ý, ẃ, ä, ë, ï, ö, ü, ÿ, ẅ, à, è, ì, ò, ù, ẁ

(This means that ASCII is not an acceptable input encoding, as it cannot encode these characters.)

Notes:

This is code golf.

You do not have to account for words like llongyfarch, in which the ng is not a digraph, but two separate letters. This word has nine letters, but you can miscount it as eight. (If you can account for such words, that's kind of awesome, but outside the scope of this challenge.)

The input is guaranteed to have no whitespace (unless you prefer it with a single trailing newline (or something more esoteric), in which case that can be provided). There will certainly be no internal whitespace.

Test cases:

Llandudno, 8

Llanelli, 6

Rhyl, 3

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch, 50 (really 51, but we'll count 50)

Tŷr, 3

Cymru, 5

Glyndŵr, 7

Body:
Python 3, 64 bytes

import re
print(len(re.findall("[cprt]h|dd|ff|ng|ll|.",input())))

Uses regex again

Ideone it!


答:
PowerShell v2+, <s>52</s> <s>50</s> 48 bytes

```<code>($args[0]-replace'dd|ff|ng|ll|[prtc]h',0).length
</code>```

Does a -replace on all the two-symbol-single-letter letters, changes 'em to 0 (done because changing to a non-numeral would require quotes), then gets the .length of the resultant string.

Test cases

```<code>PS C:\Tools\Scripts\golfing> 'Llandudno','Llanelli','Rhyl','Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch','Tŷr','Cymru','Glyndŵr'|%{"$_ --> "+(.\how-long-is-a-welsh-word.ps1 $_)}
Llandudno --> 8
Llanelli --> 6
Rhyl --> 3
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch --> 50
Tŷr --> 3
Cymru --> 5
Glyndŵr --> 7
</code>```

Title: How long is a Welsh word?

Body:
PowerShell v2+, <s>52</s> <s>50</s> 48 bytes

($args[0]-replace'dd|ff|ng|ll|[prtc]h',0).length

Does a -replace on all the two-symbol-single-letter letters, changes 'em to 0 (done because changing to a non-numeral would require quotes), then gets the .length of the resultant string.

Test cases

PS C:\Tools\Scripts\golfing> 'Llandudno','Llanelli','Rhyl','Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch','Tŷr','Cymru','Glyndŵr'|%{"$_ --> "+(.\how-long-is-a-welsh-word.ps1 $_)}
Llandudno --> 8
Llanelli --> 6
Rhyl --> 3
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch --> 50
Tŷr --> 3
Cymru --> 5
Glyndŵr --> 7


答:
Retina, 23 bytes

```<code>i`[cprt]h|dd|ff|ng|ll|.
</code>```

Try it online!

Even moar regex.

Title: How long is a Welsh word?

Body:
Retina, 23 bytes

i`[cprt]h|dd|ff|ng|ll|.

Try it online!

Even moar regex.


答:
V, 31 bytes

```<code>Íã[cprt]hüddüffüngüllü./
Dé0@"
</code>```

Try it online, or Verify all test cases!

This contains some unprintable characters, so here is a hexdump:

```<code>0000000: cde3 5b63 7072 745d 68fc 6464 fc66 66fc  ..[cprt]h.dd.ff.
0000010: 6e67 fc6c 6cfc 2e2f 010a 44e9 3040 22    ng.ll../..D.0@"
</code>```

Title: How long is a Welsh word?

Body:
V, 31 bytes

Íã[cprt]hüddüffüngüllü./
Dé0@"

Try it online, or Verify all test cases!

This contains some unprintable characters, so here is a hexdump:

0000000: cde3 5b63 7072 745d 68fc 6464 fc66 66fc  ..[cprt]h.dd.ff.
0000010: 6e67 fc6c 6cfc 2e2f 010a 44e9 3040 22    ng.ll../..D.0@"


问:
Can the number reach 1 by repeatedly subtracting the largest prime less than it?

Challenge:

Given a number, take the largest prime strictly less than it, subtract it from this number, do this again to this new number with the biggest prime less than it, and continue doing this until it's less than 3. If it reaches 1, your program should output a truthy value, else, the program should output a falsey value.

Examples:

All of these should give a truthy value:

```<code>3
4
6
8
10
11
12
14
16
17
18
20
22
23
24
26
27
29
30
32
34
35
37
38
40
41
42
44
46
47
48
50
</code>```

All of these should give falsey values:

```<code>5
7
9
13
15
19
21
25
28
31
33
36
39
43
45
49
</code>```

Rules:

You can either write a program or function.

You can assume that the input is bigger than 2.

Standard loopholes apply

This is code-golf so the shortest answer wins!

答:
Matlab, 51 bytes

```<code>v=@(x)x-max(primes(x-1));while(x>=3)x=v(x);end;x==1
</code>```

This is VERY similar to the JS6 solution by ETHProductions, but needs the variable to be in the workspace.

Body:
Matlab, 51 bytes

v=@(x)x-max(primes(x-1));while(x>=3)x=v(x);end;x==1

This is VERY similar to the JS6 solution by ETHProductions, but needs the variable to be in the workspace.


答:
05AB1E, <s>24</s> <s>23</s> 21 bytes

Code:

```<code>u•éÓœ°D¥M™ù>•30B2ô0:g
</code>```

Explanation:

```<code>u                      # Convert the input to uppercase.
 •éÓœ°D¥M™ù>•30B       # Compressed version of CHDDFFNGLLPHRHTH.
                         It convert the text between the •'s from base 214 to
                         base 10 and converts that to base 30.
                2ô     # Split into pieces of 2.
                  0:   # Replace each element that also occurs in the input by 0.
                    g  # Get the length of the processed input.
</code>```

Uses the CP-1252 encoding. Try it online!

Title: How long is a Welsh word?

Body:
05AB1E, <s>24</s> <s>23</s> 21 bytes

Code:

u•éÓœ°D¥M™ù>•30B2ô0:g

Explanation:

u                      # Convert the input to uppercase.
 •éÓœ°D¥M™ù>•30B       # Compressed version of CHDDFFNGLLPHRHTH.
                         It convert the text between the •'s from base 214 to
                         base 10 and converts that to base 30.
                2ô     # Split into pieces of 2.
                  0:   # Replace each element that also occurs in the input by 0.
                    g  # Get the length of the processed input.

Uses the CP-1252 encoding. Try it online!


答:
Straw, <s>30</s> <s>58</s> <s>35</s> 33 bytes

```<code><((?i:[cprt]h|dd|ff|ng|ll|.))0/$>
</code>```

Replace each occurence of the regex by 0, and convert from unary to decimal.

<s>Sadly, Straw can't pass flags to regexs.</s> I forget about the ?flags: construct

Try it online! (The added code is to verify all test cases)

Title: How long is a Welsh word?

Body:
Straw, <s>30</s> <s>58</s> <s>35</s> 33 bytes

<((?i:[cprt]h|dd|ff|ng|ll|.))0/$>

Replace each occurence of the regex by 0, and convert from unary to decimal.

<s>Sadly, Straw can't pass flags to regexs.</s> I forget about the ?flags: construct

Try it online! (The added code is to verify all test cases)


答:
BASH 52 50 (sed + wc) 41

-9 thanks to Jordan

```<code>sed -r 's,dd|ff|ng|ll|[cprt]h,1,gi'|wc -m
</code>```

If uppercase letter are required this needs an i at the end of the sed command. (I left it out because all of the "single letters" in the question are lowercase even though some examples aren't).

Title: How long is a Welsh word?

Body:
BASH 52 50 (sed + wc) 41

-9 thanks to Jordan

sed -r 's,dd|ff|ng|ll|[cprt]h,1,gi'|wc -m

If uppercase letter are required this needs an i at the end of the sed command. (I left it out because all of the "single letters" in the question are lowercase even though some examples aren't).


问:
Interpret whatfuck
Smallfuck is a brainfuck-like language with 1-bit cells.  It has the following instructions:

```<code>> Increment the pointer
< Decrement the pointer
* Flip the current bit
[ If the current bit is not set, jump to the instruction after the matching ]
] If the current bit is set, jump to the instruction after the matching [
    ( or just jump unconditionally to matching [ )
</code>```

Whatfuck adds one more instruction:

```<code>? Nondeterministically set the current bit to 0 or 1.
</code>```

A whatfuck program does not take any input.  It can result in one of 3 possibilities: 1 (accept), 0 (reject) or it may never halt.

The program will result in 1 if there exists a sequence of bits chosen for ?s which results in the program terminating with 1 as the current bit.

The program terminates with 0 if all possible choices terminate with current bit 0,

If some choices don't terminate, and all choices which terminate do so with 0, then the program will never terminate.

Your interpreter should run all possibilities simultaneously.  You can't try 0 first and then try 1, because some programs will not terminate when they should.  For example, *[?*]* will accept with the choice 1, but never terminate if you always choose 0.

As an example, here is a python 2 interpreter I wrote, not golfed

Rules

Your interpreter must accept a whatfuck program from stdin and print its result.

You may assume the whatfuck program only contains characters []<>*?

The array of bits is unbounded on both ends.

Shortest code wins.

Some Test Cases

This will fail if your code always tries 0 first

```<code>*[?*]*
1
</code>```

Is there a subset of {-7,-3, 5, 8} whose sum is 3?

```<code>*<<<<<?[<<<<<<<<<<<<<<]?[<<<<<<]?[>>>>>>>>>>]?[>>>>>>>>>>>>>>>>]<
1
</code>```

Is there a subset of {-7,-3, 5, 8} whose sum is 4?

```<code>*<<<<<<<?[<<<<<<<<<<<<<<]?[<<<<<<]?[>>>>>>>>>>]?[>>>>>>>>>>>>>>>>]<
0
</code>```

Is there a way to assign boolean values to a,b and c such that

(a XOR b) AND (a XOR c) AND (b XOR c) is true?

```<code>?[*>*>*<<]?[*>*>>*<<<]?[*>>*>*<<<]>[*>[*>[*>*<]<]<]>>>
0
</code>```

答:
Python (<s>405</s> <s>399</s> 379)

It takes the input on one line, but I "may assume the whatfuck program only contains characters []<>*?" and newline isn't on that list :P

```
w,i,p,a={},0,raw_input(),[(0,0,[],[])]
for c in p:
 if c=='[':a+=i,
 if c==']':g=a.pop();w[i],w[g]=g,i
 i+=1
i,z=0,lambda l:l and l.pop()or 0
while a:
 n,c,l,r=a.pop(0)
 try:o=p[n]
 except:
        if c:i=1;break
        continue
 if o=='*':c=not c
 if o=='>':l+=c,;c=z(r)
 if o=='<':r+=c,;c=z(l)
 if o in'[]'and(']'==o)==c:n=w[n]
 if o=='?':a+=(n+1,not c,l[:],r[:]),
 a+=(n+1,c,l,r),
print i

```

Title: Interpret whatfuck

Body:
Python (<s>405</s> <s>399</s> 379)

It takes the input on one line, but I "may assume the whatfuck program only contains characters []<>*?" and newline isn't on that list :P

w,i,p,a={},0,raw_input(),[(0,0,[],[])]
for c in p:
 if c=='[':a+=i,
 if c==']':g=a.pop();w[i],w[g]=g,i
 i+=1
i,z=0,lambda l:l and l.pop()or 0
while a:
 n,c,l,r=a.pop(0)
 try:o=p[n]
 except:
        if c:i=1;break
        continue
 if o=='*':c=not c
 if o=='>':l+=c,;c=z(r)
 if o=='<':r+=c,;c=z(l)
 if o in'[]'and(']'==o)==c:n=w[n]
 if o=='?':a+=(n+1,not c,l[:],r[:]),
 a+=(n+1,c,l,r),
print i


答:
Python 2.7, 84 bytes

```<code>s=input()
b=s[0]<s[1]
o=1
for i in range(len(s)-1):o&=(s[i]<s[i+1])==b;b^=1
print o
</code>```

Returns 1 for bumpy, 0 for otherwise

Learned some cool stuff with bitwise & and ^.

Starts with boolean b defining first pair as up/down, then tests and flips b for each following pair.

o flips to false if test fails and sticks.

Requires quotes around input (+4 bytes for raw_input() if that breaks some rule)

Test It

Title: Is it a Bumpy Word?

Body:
Python 2.7, 84 bytes

s=input()
b=s[0]<s[1]
o=1
for i in range(len(s)-1):o&=(s[i]<s[i+1])==b;b^=1
print o

Returns 1 for bumpy, 0 for otherwise

Learned some cool stuff with bitwise & and ^.

Starts with boolean b defining first pair as up/down, then tests and flips b for each following pair.

o flips to false if test fails and sticks.

Requires quotes around input (+4 bytes for raw_input() if that breaks some rule)

Test It


答:
PHP, 80 bytes

```<code>$s=$argv[1];for($c=$s[0];$n=$s[++$i];$c=$n,$d=$e)if($d===$e=$n>$c)break;echo!$n;
</code>```

or

```<code>for($c=$argv[1][0];$n=$argv[1][++$i];$c=$n,$d=$e)if($d===$e=$n>$c)break;echo!$n;
</code>```

empty output for false, 1 for true

or Hedi´s recursive approach ported and a little golfed for 70 bytes:

```<code>function f($s){return!$s[2]|$s[0]<$s[1]^$s[1]<$s[2]&&f(substr($s,1));}
</code>```

Actually, this should recurse infinitely for bumpy words, but it does not!

Title: Is it a Bumpy Word?

Body:
PHP, 80 bytes

$s=$argv[1];for($c=$s[0];$n=$s[++$i];$c=$n,$d=$e)if($d===$e=$n>$c)break;echo!$n;

or

for($c=$argv[1][0];$n=$argv[1][++$i];$c=$n,$d=$e)if($d===$e=$n>$c)break;echo!$n;

empty output for false, 1 for true

or Hedi´s recursive approach ported and a little golfed for 70 bytes:

function f($s){return!$s[2]|$s[0]<$s[1]^$s[1]<$s[2]&&f(substr($s,1));}

Actually, this should recurse infinitely for bumpy words, but it does not!


答:
C# 105 104 Bytes

```<code>bool f(char[]x){int t=1;for(int i=2,p=x[1],f=x[0]-p>>7;i<x.Length;)f^=t&=p<(p=x[i++])?1-f:f;return t>0;}
</code>```

105 bytes Solution:

```<code>bool f(char[]x){bool t=1>0,f=x[0]<x[1];for(int i=2,p=x[1];i<x.Length;)f^=t&=p<(p=x[i++])?!f:f;return t;}
</code>```

Try it online

Using an array of chars saved one byte since the space can be omitted after the brackets. f(string x) vs f(char[]x)

It is 101 bytes if I can return an int 1/0 instead of bool true/false

```<code>int f(char[]x){int t=1;for(int i=2,p=x[1],f=x[0]-p>>7;i<x.Length;)f^=t&=p<(p=x[i++])?1-f:f;return t;}
</code>```

Title: Is it a Bumpy Word?

Body:
C# 105 104 Bytes

bool f(char[]x){int t=1;for(int i=2,p=x[1],f=x[0]-p>>7;i<x.Length;)f^=t&=p<(p=x[i++])?1-f:f;return t>0;}

105 bytes Solution:

bool f(char[]x){bool t=1>0,f=x[0]<x[1];for(int i=2,p=x[1];i<x.Length;)f^=t&=p<(p=x[i++])?!f:f;return t;}

Try it online

Using an array of chars saved one byte since the space can be omitted after the brackets. f(string x) vs f(char[]x)

It is 101 bytes if I can return an int 1/0 instead of bool true/false

int f(char[]x){int t=1;for(int i=2,p=x[1],f=x[0]-p>>7;i<x.Length;)f^=t&=p<(p=x[i++])?1-f:f;return t;}


问:
Consolidate an Array
The task is simple: consolidate an array of ints. Consolidating this array consists of the following:

All instances of 0 need to be moved to the end of the array.

There should be no 0s between the non-zero integers.

All non-zero indices should retain their order.

Challenge

Consolidate an array in the least amount of bytes.

You are consolidating an array of random length with a size up to your language's max with random integers. Input may be any natural way for your language.

Examples

Input

```<code>0 5 8 8 3 5 1 6 8 4 0 3 7 5 6 4 4 7 5 6 7 4 4 9 1 0 5 7 9 3 0 2 2 4 3 0 4 8 7 3 1 4 7 5 1 2 1 8 7 8 7 7 2 6 3 1 2 8 5 1 4 2 0 5 0 6 0 3</code>```

Output

```<code>5 8 8 3 5 1 6 8 4 3 7 5 6 4 4 7 5 6 7 4 4 9 1 5 7 9 3 2 2 4 3 4 8 7 3 1 4 7 5 1 2 1 8 7 8 7 7 2 6 3 1 2 8 5 1 4 2 5 6 3 0 0 0 0 0 0 0 0</code>```

Input

```<code>-1 -7 -6 5 1 -5 -2 7 -3 -8 0 8 9 1 -8 -1 6 -4 1 -2 1 -7 5 4 -6 7 -3 9 8 3 -1 0 -5 -7 3 8 1 1 3 -3 -2 -2 0 -7 0 -4 8 6 -3 6 0 5 3 2 2 2 -2 -7 -3 9 -1 6 0 6 -7 9 4 -2 8 -8 -4 1 -8 4 3 7 3 5 1 0 3 3 7 -1 -5 1 -3 4 -7 0 3 2 -2 7 -3 0 0 2 -5 8 -3 -2 -7 -5 7 -3 -9 -7 5 8 -3 9 6 7 -2 4 7</code>```

Output

```<code>-1 -7 -6 5 1 -5 -2 7 -3 -8 8 9 1 -8 -1 6 -4 1 -2 1 -7 5 4 -6 7 -3 9 8 3 -1 -5 -7 3 8 1 1 3 -3 -2 -2 -7 -4 8 6 -3 6 5 3 2 2 2 -2 -7 -3 9 -1 6 6 -7 9 4 -2 8 -8 -4 1 -8 4 3 7 3 5 1 3 3 7 -1 -5 1 -3 4 -7 3 2 -2 7 -3 2 -5 8 -3 -2 -7 -5 7 -3 -9 -7 5 8 -3 9 6 7 -2 4 7 0 0 0 0 0 0 0 0 0 0</code>```

Example Code (Java)

```<code>public class Consolidate {
    public static void main(String[] args) throws Exception {
        int[] toConsolidate = new int[args.length];
        for (int i=0; i<args.length; i++){
            toConsolidate[i]=Integer.parseInt(args[i]);
        }
        for (int i=0; i<toConsolidate.length; i++) {
            for (int k=0; k<toConsolidate.length-1; k++) {
                if (toConsolidate[k] == 0){
                    toConsolidate[k] = toConsolidate[k+1];
                    toConsolidate[k+1] = 0;
                }
            }
        }
        for (int i:toConsolidate)
            System.out.print(i+" ");
    }
}</code>```

答:
Straw, <s>30</s> 29 bytes

```<code><:([^0 ])()/,0()/ +,+( +) /}>
</code>```

Use the CP437 encoding

Explanation

```<code><:([^0 ])()/,0()/ +,+( +) /}>
<                             Take input
 :                            Duplicate
  ([^0 ])()/                  Remove every character that is not a 0 or a space
            ,                 Swap the two items on the top of the stack
             0()/             Remove every 0 on the top of the stack
                  +           Push a space and concatenate
                   ,          Swap
                    +         Concatenate
                     ( +) /   Remove duplicate spaces
                           }  Get the 'tail' of the string
                            > Output
</code>```

Try it online! (The added code is to test all test cases)

Title: Consolidate an Array

Body:
Straw, <s>30</s> 29 bytes

<:([^0 ])()/,0()/ +,+( +) /}>

Use the CP437 encoding

Explanation

<:([^0 ])()/,0()/ +,+( +) /}>
<                             Take input
 :                            Duplicate
  ([^0 ])()/                  Remove every character that is not a 0 or a space
            ,                 Swap the two items on the top of the stack
             0()/             Remove every 0 on the top of the stack
                  +           Push a space and concatenate
                   ,          Swap
                    +         Concatenate
                     ( +) /   Remove duplicate spaces
                           }  Get the 'tail' of the string
                            > Output

<a href="http://straw.tryitonline.net/#code=KDw6KFteMCBdKSgpLywwKCkvICssKyggKykgL30-Cj4pOiYm&input=MCA1IDggOCAzIDUgMSA2IDggNCAwIDMgNyA1IDYgNCA0IDcgNSA2IDcgNCA0IDkgMSAwIDUgNyA5IDMgMCAyIDIgNCAzIDAgNCA4IDcgMyAxIDQgNyA1IDEgMiAxIDggNyA4IDcgNyAyIDYgMyAxIDIgOCA1IDEgNCAyIDAgNSAwIDYgMCAzCi0xIC03IC02IDUgMSAtNSAtMiA3IC0zIC04IDAgOCA5IDEgLTggLTEgNiAtNCAxIC0yIDEgLTcgNSA0IC02IDcgLTMgOSA4IDMgLTEgMCAtNSAtNyAzIDggMSAxIDMgLTMgLTIgLTIgMCAtNyAwIC00IDggNiAtMyA2IDAgNSAzIDIgMiAyIC0yIC03IC0zIDkgLTEgNiAwIDYgLTcgOSA0IC0yIDggLTggLTQgMSAtOCA0IDMgNyAzIDUgMSAwIDMgMyA3IC0xIC01IDEgLTMgNCAtNyAwIDMgMiAtMiA3IC0zIDAgMCAyIC01IDggLTMgLTIgLTcgLTUgNyAtMyAtOSAtNyA1IDggLTMgOSA2IDcgLTIgNCA3" rel="nofollow">Try it online! (The added code is to test all test cases)


答:
PHP , 56 Bytes

```<code><?=preg_match_all("#[cprt]h|dd|ff|ll|ng|.#iu",$argv[1]);
</code>```

Title: How long is a Welsh word?

Body:
PHP , 56 Bytes

<?=preg_match_all("#[cprt]h|dd|ff|ll|ng|.#iu",$argv[1]);