Number guess 1000

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

You should know the very tiny game sometimes called "Number guess". The computer thinks about a number between a agreed area, in this case from 1 to 1000. Then you guess the number and the computer answers if it's to low '<' or to high '>'. The objective of the game is to guess the number in as few as possible tries.

In this Problem it is a littlebit different. The program gets a number and tries to solve it with few as possible tries. So for example, if my number is 768, it first tries 500 and returns not only the number, but also the '<'-sign, because this number is to low. Then it adds 250, which is fortunately 500/2, because it was to low. So now the guess is 750, and again '<'. But now it adds the half again, which is 125. Then the number gets to high, because it is now 875, so it adds '>'. Next time it subtracts the half, which is now 62.5. Next number would be 812.5, but it's rounded to 813, again to high. After a while 768 is tried. And as it is the right one, a equal-sign is added.

Importance is really the right rounding. I'm feeling sorry that the original game isn't working in golf, but I hope you will understand it. By the way: It should also work with more numbers, so just add a blank line between them in Output.

Options

exec is denied

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

Sample input:_

768

Sample output:

500 <
750 <
875 >
813 >
782 >
766 <
774 >
770 >
768 =

Sample input:_

237
131
168
890
736
128
786
951
603
5
839
384
606
875
239
198
969
804
80
748
238
835
685
201
995
476
272
173
70
682
135
818
417
861
743
135
298
939
681
794
944
10
815
248
336
606
609
418
276
122
983
734
394
414
635
809
249
116
214
524
188
703
271
824
105
821
375
976
771
930
314
597
883
787
781
225
489
791
454
698
945
734
872
156
65
981
19
914
615
614
15
4
806
570
833
666
952
304
429
569

Sample output:

500 >
250 >
125 <
188 <
219 <
235 <
243 >
239 >
237 =

500 >
250 >
125 <
188 >
157 >
141 >
133 >
129 <
131 =

500 >
250 >
125 <
188 >
157 <
173 >
165 <
169 >
167 <
168 =

500 <
750 <
875 <
938 >
907 >
891 >
883 <
887 <
889 <
890 =

500 <
750 >
625 <
688 <
719 <
735 <
743 >
739 >
737 >
736 =

500 >
250 >
125 <
188 >
157 >
141 >
133 >
129 >
127 <
128 =

500 <
750 <
875 >
813 >
782 <
798 >
790 >
786 =

500 <
750 <
875 <
938 <
969 >
953 >
945 <
949 <
951 =

500 <
750 >
625 >
563 <
594 <
610 >
602 <
606 >
604 >
603 =

500 >
250 >
125 >
63 >
32 >
16 >
8 >
4 <
6 >
5 =

500 <
750 <
875 >
813 <
844 >
828 <
836 <
840 >
838 <
839 =

500 >
250 <
375 <
438 >
407 >
391 >
383 <
387 >
385 >
384 =

500 <
750 >
625 >
563 <
594 <
610 >
602 <
606 =

500 <
750 <
875 =

500 >
250 >
125 <
188 <
219 <
235 <
243 >
239 =

500 >
250 >
125 <
188 <
219 >
203 >
195 <
199 >
197 <
198 =

500 <
750 <
875 <
938 <
969 =

500 <
750 <
875 >
813 >
782 <
798 <
806 >
802 <
804 =

500 >
250 >
125 >
63 <
94 >
78 <
86 >
82 >
80 =

500 <
750 >
625 <
688 <
719 <
735 <
743 <
747 <
749 >
748 =

500 >
250 >
125 <
188 <
219 <
235 <
243 >
239 >
237 <
238 =

500 <
750 <
875 >
813 <
844 >
828 <
836 >
832 <
834 <
835 =

500 <
750 >
625 <
688 >
657 <
673 <
681 <
685 =

500 >
250 >
125 <
188 <
219 >
203 >
195 <
199 <
201 =

500 <
750 <
875 <
938 <
969 <
985 <
993 <
997 >
995 =

500 >
250 <
375 <
438 <
469 <
485 >
477 >
473 <
475 <
476 =

500 >
250 <
375 >
313 >
282 >
266 <
274 >
270 <
272 =

500 >
250 >
125 <
188 >
157 <
173 =

500 >
250 >
125 >
63 <
94 >
78 >
70 =

500 <
750 >
625 <
688 >
657 <
673 <
681 <
685 >
683 >
682 =

500 >
250 >
125 <
188 >
157 >
141 >
133 <
137 >
135 =

500 <
750 <
875 >
813 <
844 >
828 >
820 >
816 <
818 =

500 >
250 <
375 <
438 >
407 <
423 >
415 <
419 >
417 =

500 <
750 <
875 >
813 <
844 <
860 <
868 >
864 >
862 >
861 =

500 <
750 >
625 <
688 <
719 <
735 <
743 =

500 >
250 >
125 <
188 >
157 >
141 >
133 <
137 >
135 =

500 >
250 <
375 >
313 >
282 <
298 =

500 <
750 <
875 <
938 <
969 >
953 >
945 >
941 >
939 =

500 <
750 >
625 <
688 >
657 <
673 <
681 =

500 <
750 <
875 >
813 >
782 <
798 >
790 <
794 =

500 <
750 <
875 <
938 <
969 >
953 >
945 >
941 <
943 <
944 =

500 >
250 >
125 >
63 >
32 >
16 >
8 <
12 >
10 =

500 <
750 <
875 >
813 <
844 >
828 >
820 >
816 >
814 <
815 =

500 >
250 >
125 <
188 <
219 <
235 <
243 <
247 <
249 >
248 =

500 >
250 <
375 >
313 <
344 >
328 <
336 =

500 <
750 >
625 >
563 <
594 <
610 >
602 <
606 =

500 <
750 >
625 >
563 <
594 <
610 >
602 <
606 <
608 <
609 =

500 >
250 <
375 <
438 >
407 <
423 >
415 <
419 >
417 <
418 =

500 >
250 <
375 >
313 >
282 >
266 <
274 <
278 >
276 =

500 >
250 >
125 >
63 <
94 <
110 <
118 <
122 =

500 <
750 <
875 <
938 <
969 <
985 >
977 <
981 <
983 =

500 <
750 >
625 <
688 <
719 <
735 >
727 <
731 <
733 <
734 =

500 >
250 <
375 <
438 >
407 >
391 <
399 >
395 >
393 <
394 =

500 >
250 <
375 <
438 >
407 <
423 >
415 >
411 <
413 <
414 =

500 <
750 >
625 <
688 >
657 >
641 >
633 <
637 >
635 =

500 <
750 <
875 >
813 >
782 <
798 <
806 <
810 >
808 <
809 =

500 >
250 >
125 <
188 <
219 <
235 <
243 <
247 <
249 =

500 >
250 >
125 >
63 <
94 <
110 <
118 >
114 <
116 =

500 >
250 >
125 <
188 <
219 >
203 <
211 <
215 >
213 <
214 =

500 <
750 >
625 >
563 >
532 >
516 <
524 =

500 >
250 >
125 <
188 =

500 <
750 >
625 <
688 <
719 >
703 =

500 >
250 <
375 >
313 >
282 >
266 <
274 >
270 <
272 >
271 =

500 <
750 <
875 >
813 <
844 >
828 >
820 <
824 =

500 >
250 >
125 >
63 <
94 <
110 >
102 <
106 >
104 <
105 =

500 <
750 <
875 >
813 <
844 >
828 >
820 <
824 >
822 >
821 =

500 >
250 <
375 =

500 <
750 <
875 <
938 <
969 <
985 >
977 >
973 <
975 <
976 =

500 <
750 <
875 >
813 >
782 >
766 <
774 >
770 <
772 >
771 =

500 <
750 <
875 <
938 >
907 <
923 <
931 >
927 <
929 <
930 =

500 >
250 <
375 >
313 <
344 >
328 >
320 >
316 >
314 =

500 <
750 >
625 >
563 <
594 <
610 >
602 >
598 >
596 <
597 =

500 <
750 <
875 <
938 >
907 >
891 >
883 =

500 <
750 <
875 >
813 >
782 <
798 >
790 >
786 <
788 >
787 =

500 <
750 <
875 >
813 >
782 >
766 <
774 <
778 <
780 <
781 =

500 >
250 >
125 <
188 <
219 <
235 >
227 >
223 <
225 =

500 >
250 <
375 <
438 <
469 <
485 <
493 >
489 =

500 <
750 <
875 >
813 >
782 <
798 >
790 <
794 >
792 >
791 =

500 >
250 <
375 <
438 <
469 >
453 <
461 >
457 >
455 >
454 =

500 <
750 >
625 <
688 <
719 >
703 >
695 <
699 >
697 <
698 =

500 <
750 <
875 <
938 <
969 >
953 >
945 =

500 <
750 >
625 <
688 <
719 <
735 >
727 <
731 <
733 <
734 =

500 <
750 <
875 >
813 <
844 <
860 <
868 <
872 =

500 >
250 >
125 <
188 >
157 >
141 <
149 <
153 <
155 <
156 =

500 >
250 >
125 >
63 <
94 >
78 >
70 >
66 >
64 <
65 =

500 <
750 <
875 <
938 <
969 <
985 >
977 <
981 =

500 >
250 >
125 >
63 >
32 >
16 <
24 >
20 >
18 <
19 =

500 <
750 <
875 <
938 >
907 <
923 >
915 >
911 <
913 <
914 =

500 <
750 >
625 >
563 <
594 <
610 <
618 >
614 <
616 >
615 =

500 <
750 >
625 >
563 <
594 <
610 <
618 >
614 =

500 >
250 >
125 >
63 >
32 >
16 >
8 <
12 <
14 <
15 =

500 >
250 >
125 >
63 >
32 >
16 >
8 >
4 =

500 <
750 <
875 >
813 >
782 <
798 <
806 =

500 <
750 >
625 >
563 <
594 >
578 >
570 =

500 <
750 <
875 >
813 <
844 >
828 <
836 >
832 <
834 >
833 =

500 <
750 >
625 <
688 >
657 <
673 >
665 <
669 >
667 >
666 =

500 <
750 <
875 <
938 <
969 >
953 >
945 <
949 <
951 <
952 =

500 >
250 <
375 >
313 >
282 <
298 <
306 >
302 <
304 =

500 >
250 <
375 <
438 >
407 <
423 <
431 >
427 <
429 =

500 <
750 >
625 >
563 <
594 >
578 >
570 >
566 <
568 <
569 =

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid820.03932011/02/20 13:00:310B / 40B / 34B
2yvl840.06132011/02/06 03:22:150B / 38B / 42B
3aglias1070.03782011/02/18 22:54:560B / 56B / 44B
4iwadon1330.03952011/02/13 23:11:320B / 52B / 76B
5leonid800.02492011/03/04 03:58:350B / 35B / 39B

Perl _

RankUserSizeTimeDateStatistics
1teebee780.00652011/03/03 17:17:380B / 25B / 50B
2tybalt89820.01722011/02/05 01:01:310B / ?B / ?B
3tails830.02342011/02/07 01:05:050B / 32B / 49B

Python _

RankUserSizeTimeDateStatistics
1recursive950.06752011/02/04 01:56:320B / 52B / 34B
2xulapp960.05822011/03/02 21:15:410B / 53B / 34B
3hallvabo970.06152011/03/03 20:47:110B / 54B / 34B
4twobit980.07102011/02/05 00:19:520B / 52B / 37B

PHP _

RankUserSizeTimeDateStatistics
1Endres1330.07932011/02/04 01:26:360B / ?B / ?B

Common LISP _

RankUserSizeTimeDateStatistics
1youz1220.54202011/03/01 12:43:430B / 47B / 65B
2kozima1270.35712011/03/01 09:06:510B / 50B / 64B

Arc _

RankUserSizeTimeDateStatistics
1youz1124.13642011/03/03 21:44:140B / 46B / 49B

Io _

RankUserSizeTimeDateStatistics
1pooq1440.40372011/02/06 10:27:530B / 84B / 51B

JavaScript _

RankUserSizeTimeDateStatistics
1xulapp880.01282011/02/27 11:08:440B / 42B / 46B
2murky-satyr880.01182011/03/03 03:01:030B / 37B / 51B
3nn890.02702011/02/06 13:33:480B / 43B / 46B
4push_back910.02472011/02/14 02:33:580B / ?B / ?B

Xtal _

RankUserSizeTimeDateStatistics
1pooq1380.09892011/02/08 20:16:550B / 60B / 71B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*1040.01242011/02/12 21:57:080B / 57B / 40B
2pooq1290.00172011/02/06 04:21:050B / 70B / 41B

J _

RankUserSizeTimeDateStatistics
1I., S.1160.21662011/03/03 23:57:490B / 39B / 66B
2I., S.890.08212011/10/22 22:54:550B / 32B / 55B
3I., S.(imperative)940.06112011/10/22 22:57:190B / 47B / 43B

C _

RankUserSizeTimeDateStatistics
1not1110.03342011/02/07 21:00:150B / 48B / 62B
2Reputeless1140.00172011/02/09 13:38:040B / 46B / 67B
3kou1160.00202011/02/23 16:07:420B / 51B / 63B
4inaniwa1170.02462011/02/08 08:35:590B / 57B / 59B
5torikara1190.00172011/02/20 16:39:110B / 60B / 58B
6nn1200.00172011/02/06 14:17:330B / 60B / 58B
7deadlysins1230.00182011/02/16 01:06:220B / ?B / ?B
8TBM_lover1250.00372011/02/16 01:31:570B / ?B / ?B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1610.03242011/02/08 21:27:200B / 105B / 49B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1120.01362011/02/04 22:29:070B / 67B / 43B
2*yuko*1100.02642011/11/27 16:12:530B / 65B / 43B

Maxima _

RankUserSizeTimeDateStatistics
1pooq1390.82792011/02/07 17:59:100B / 64B / 67B
2pooq1380.81042011/03/11 11:58:090B / 62B / 69B

R _

RankUserSizeTimeDateStatistics
1pooq1201.32812011/02/07 11:55:530B / 56B / 58B

z80 _

RankUserSizeTimeDateStatistics
1*yuko*1070.05422011/02/12 16:15:1864B / 17B / 15B
2*yuko*1050.04262011/08/11 05:16:3759B / 19B / 15B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr1104.89552011/03/03 18:41:510B / 56B / 48B
2hoozie1125.05212011/02/25 21:01:150B / 64B / 40B
3nn1144.84952011/02/26 12:55:280B / 58B / 48B

Scala _

RankUserSizeTimeDateStatistics
1murky-satyr1386.92262011/03/03 23:11:030B / 77B / 51B
2pooq1537.08322011/02/26 20:14:190B / 85B / 61B

Language Ranking_

RankLangUserSizeScore
1Perlteebee7810000
2Rubyleonid809750
3JavaScriptxulapp888863
4JI., S.898764
5Pythonrecursive958210
6BASIC*yuko*1047500
7z80*yuko*1057428
8Groovymurky-satyr1107090
9Fortran*yuko*1107090
10Cnot1117027
11Arcyouz1126964
12Rpooq1206500
13Common LISPyouz1226393
14PHPEndres1335864
15Xtalpooq1385652
16Scalamurky-satyr1385652
17Maximapooq1385652
18Iopooq1445416
19Pascal*yuko*1614844

return top