Invert FizzBuzz

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Given a list consists of words "Fizz", "Buzz" and "FizzBuzz".
Find the shortest contiguous sequence of numbers that produces that list.
Print its first and last number (smallest when multiple sequences exist), or nothing if no sequence produces that list.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

Fizz
Buzz
Fizz Buzz
Buzz Fizz
Fizz Buzz Fizz
Buzz Fizz Buzz
Fizz Fizz
Fizz Fizz Buzz

Sample output:

3 3
5 5
9 10
5 6
3 6

6 9
6 10

Sample input:_

Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Fizz
Fizz Buzz Fizz Fizz Buzz Fizz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
FizzBuzz Buzz
Fizz Fizz Buzz
Buzz Fizz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz
Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Fizz Buzz FizzBuzz
Buzz FizzBuzz
Fizz FizzBuzz
Buzz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz
FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
FizzBuzz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Buzz Buzz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Fizz Fizz
FizzBuzz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Fizz FizzBuzz Fizz
Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz
Buzz Fizz FizzBuzz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz
FizzBuzz Buzz Fizz
Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz
Buzz FizzBuzz FizzBuzz
FizzBuzz FizzBuzz Buzz
FizzBuzz Buzz Buzz
Buzz FizzBuzz Fizz
Fizz Fizz FizzBuzz
Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
FizzBuzz FizzBuzz
Fizz FizzBuzz FizzBuzz
FizzBuzz FizzBuzz Fizz
Fizz FizzBuzz Buzz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Buzz FizzBuzz Buzz
FizzBuzz FizzBuzz FizzBuzz
Fizz Fizz Fizz
Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Fizz Buzz Fizz
Buzz Buzz
Fizz Buzz
Fizz Buzz Buzz
Buzz Buzz FizzBuzz
Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
Buzz Buzz Buzz
FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Buzz Fizz Fizz
FizzBuzz Fizz Fizz
Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz
Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz
Fizz Fizz Buzz Fizz
FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz
FizzBuzz Fizz FizzBuzz
FizzBuzz Buzz FizzBuzz
Buzz Fizz Buzz
FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz
Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz FizzBuzz Fizz Buzz Fizz Fizz Buzz Fizz
FizzBuzz Fizz Buzz

Sample output:

9 72
3 3
3 12
3 45

6 10
5 6
3 96
12 102


12 15
5 5
3 93
15 177
3 27
5 33
9 115
9 48
9 87
15 18
9 30

9 180
6 9
15 15
9 135
12 18
12 96
10 15
3 55

10 85





3 33
9 150




9 120



12 42
3 6

9 10


12 72

15 30
5 9

9 55
10 65
6 12
15 66



15 45
12 162
15 20

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1clock1200.04212012/05/30 23:13:310B / 39B / 76B
2leonid1210.78222012/05/30 08:26:570B / 51B / 65B

Perl _

RankUserSizeTimeDateStatistics
1tybalt89900.05342012/05/29 05:41:370B / ?B / ?B
2nfouille990.07822012/05/19 01:07:320B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1dekosuke1991.82432012/05/18 20:34:410B / 116B / 63B

PHP _

RankUserSizeTimeDateStatistics
1clock1920.16452012/05/31 00:16:165B / 89B / 97B
2JimmyZ17570.07782014/02/21 11:16:560B / 746B / 335B

Scheme _

RankUserSizeTimeDateStatistics
1kaki3080.11682012/05/26 03:19:560B / 180B / 107B

JavaScript _

RankUserSizeTimeDateStatistics
1clock1680.03862012/05/30 01:17:370B / 92B / 76B
2nn1680.06552012/05/31 01:44:020B / 90B / 75B

J _

RankUserSizeTimeDateStatistics
1I., S.1020.08992012/05/29 06:53:130B / 41B / 55B
2I., S.1000.11032012/05/31 05:48:370B / 38B / 58B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1550.25672012/05/24 19:52:520B / 87B / 63B
2notogawa1580.21882012/05/19 17:21:460B / 89B / 62B
3xenophobia1860.22282012/05/19 02:29:320B / 96B / 81B

Groovy _

RankUserSizeTimeDateStatistics
1clock1663.06202012/05/29 23:21:250B / 84B / 77B
2nn1802.86442012/05/28 00:42:110B / 98B / 75B

Scala _

RankUserSizeTimeDateStatistics
1slightair51614.79792012/05/19 15:58:280B / 316B / 184B
2mtgto100012.53912012/05/17 03:13:470B / 524B / 202B

Language Ranking_

RankLangUserSizeScore
1Perltybalt899010000
2JI., S.1009000
3Rubyclock1207500
4Haskellhenkma1555806
5Groovyclock1665421
6JavaScriptclock1685357
7PHPclock1924687
8Pythondekosuke1994522
9Schemekaki3082922
10Scalaslightair5161744

return top