Equations

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

print the lines where the equation is wrong.
Equations have the following format:

a [b,c,d...] = e [f,g,h,i,...]

If the next number is greater than the preceding number you
have to add them together, if it is less you have to subtract the two numbers. If they're equal you have to multiply the numbers. You need to use the intermediate data.

Options

exec is denied

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

Sample input:_

5=2 3
5=3 2
1=3 2
4 4  =   16
  3 3=12
1 2 3=6
1 4 1 = 2 2

Sample output:

5=3 2
  3 3=12
1 2 3=6

Sample input:_

1 3 4=16
3 1 4=16
5 1 4=16

Sample output:

3 1 4=16

Sample input:_

19=20
19=19
1 1 1 1 1 1 1 = 0
5 1 1 1=2
5 1 1 =          2

Sample output:

19=20
1 1 1 1 1 1 1 = 0
5 1 1 =          2

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid200.05452011/06/19 13:25:040B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1tails200.05652011/06/19 15:33:440B / 13B / 6B
2teebee200.05482011/06/20 13:22:560B / 13B / 6B
3teebee(alnum)310.04712011/06/20 09:30:590B / 26B / 0B

Python _

RankUserSizeTimeDateStatistics
1hallvabo510.08822011/06/20 22:01:480B / 34B / 10B
2twobit510.18912011/06/29 20:43:340B / 34B / 11B
3pv2b1250.07452011/06/19 13:54:450B / 74B / 40B
4feuermonster1360.09752011/07/02 07:41:320B / 80B / 46B
5Kohlrabi1600.32392011/06/20 06:11:138B / 80B / 39B

J _

RankUserSizeTimeDateStatistics
1I., S.520.11502011/06/19 10:42:580B / 14B / 37B
2I., S.(embed)450.15562011/08/17 18:27:020B / 19B / 25B
3I., S.510.10612011/08/17 18:27:380B / 12B / 38B

C _

RankUserSizeTimeDateStatistics
1inaniwa(embed)460.04102011/06/20 16:37:350B / 24B / 22B
2koi740.04872011/06/20 22:17:050B / 38B / 35B
3madogiwa740.07862011/06/28 20:28:270B / 38B / 36B
4kou1200.10872011/06/29 12:13:540B / 61B / 59B

Haskell _

RankUserSizeTimeDateStatistics
1NearO (unclean)970.04492011/06/20 11:19:340B / 57B / 33B
2feuermonster1350.19472011/07/02 04:46:050B / ?B / ?B
3NearO1370.03492011/06/20 06:31:520B / 76B / 55B
4feuermonster1330.20852011/07/02 18:42:270B / 70B / 55B

sed _

RankUserSizeTimeDateStatistics
1lvogel180.00242011/06/19 05:22:530B / ?B / ?B

Bash _

RankUserSizeTimeDateStatistics
1lvogel240.03232011/06/19 05:25:380B / ?B / ?B

Zsh _

RankUserSizeTimeDateStatistics
1lvogel240.27382011/06/19 05:26:140B / ?B / ?B

Fish _

RankUserSizeTimeDateStatistics
1lvogel240.26832011/06/19 05:25:540B / ?B / ?B

bc _

RankUserSizeTimeDateStatistics
1lvogel1090.06262011/06/19 02:00:210B / 52B / 22B
2teebee(lvogel)1080.06852011/07/03 15:15:070B / 52B / 22B

dc _

RankUserSizeTimeDateStatistics
1lvogel910.02502011/06/19 04:16:290B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1tails130.17432011/06/19 23:36:130B / 7B / 6B

Language Ranking_

RankLangUserSizeScore
1GolfScripttails1310000
2sedlvogel187222
3Rubyleonid206500
4Perltails206500
5Bashlvogel245416
6Fishlvogel245416
7Zshlvogel245416
8JI., S.(embed)452888
9Cinaniwa(embed)462826
10Pythonhallvabo512549
11dclvogel911428
12HaskellNearO (unclean)971340
13bcteebee(lvogel)1081203

return top