Moderator: Community Team
El Capitan X wrote:The people in flame wars just seem to get dimmer and dimmer. Seriously though, I love your style, always a good read.
TheProwler wrote:So does this satisfy the conditions to be considered a solution?
Call the switches A, B, C, D. So, turn 2 switches on - A and B. Wait one minute or so (enough time for the bulb to get very hot if it is on). Now, quickly turn off B and turn on C and lift the lid. Touch the bulb. Is it very hot?
A - bulb is lit and very hot
B - bulb is out and very hot
C - bulb is lit and cool
D - bulb is out and cool
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
john9blue wrote:TheProwler wrote:So does this satisfy the conditions to be considered a solution?
Call the switches A, B, C, D. So, turn 2 switches on - A and B. Wait one minute or so (enough time for the bulb to get very hot if it is on). Now, quickly turn off B and turn on C and lift the lid. Touch the bulb. Is it very hot?
A - bulb is lit and very hot
B - bulb is out and very hot
C - bulb is lit and cool
D - bulb is out and cool
Yup, that's what I had in mind.
Umm... another one... okay, so you're a school janitor and you're bored. You decide to mess with the lockers, because the students are pissing you off. The hallway is lined with 1000 lockers, labeled 1 to 1000. You walk down the hallway and open every locker. Then you walk down again and close every locker that's a multiple of 2. Then, you walk down a third time and change every locker that is a multiple of 3 (by "change", I mean close it if it is open and open it if it is closed). Then you do the same for multiples of 4, 5, etc., until you reach multiples of 100 (i.e. changing lockers 100, 200, 300, ... 1000). When you finish, which lockers will be open?
There is a problem like this that some of you may have heard, so I added my own twist to change things up.
El Capitan X wrote:The people in flame wars just seem to get dimmer and dimmer. Seriously though, I love your style, always a good read.
qeee1 wrote:Girls can't drive buses.
jay_a2j wrote:hey if any1 would like me to make them a signature or like an avator just let me no, my sig below i did, and i also did "panther 88" so i can do something like that for u if ud like...
john9blue wrote:TheProwler wrote:So does this satisfy the conditions to be considered a solution?
Call the switches A, B, C, D. So, turn 2 switches on - A and B. Wait one minute or so (enough time for the bulb to get very hot if it is on). Now, quickly turn off B and turn on C and lift the lid. Touch the bulb. Is it very hot?
A - bulb is lit and very hot
B - bulb is out and very hot
C - bulb is lit and cool
D - bulb is out and cool
Yup, that's what I had in mind.
Umm... another one... okay, so you're a school janitor and you're bored. You decide to mess with the lockers, because the students are pissing you off. The hallway is lined with 1000 lockers, labeled 1 to 1000. You walk down the hallway and open every locker. Then you walk down again and close every locker that's a multiple of 2. Then, you walk down a third time and change every locker that is a multiple of 3 (by "change", I mean close it if it is open and open it if it is closed). Then you do the same for multiples of 4, 5, etc., until you reach multiples of 100 (i.e. changing lockers 100, 200, 300, ... 1000). When you finish, which lockers will be open?
There is a problem like this that some of you may have heard, so I added my own twist to change things up.
Haggis_McMutton wrote:I think enough time has passed that it`s safe to say this one won't likely be solved( damn your "twist")
So to encourage you to post the solution and move on, i thought i'd do the nice thing and brute force it.
1 4 9 16 25 36 49 64 81 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 197 198 199 200 201 203 205 207 209 211 213 215 217 219 221 223 227 229 231 233 235 237 239 241 243 245 247 249 251 253 255 256 257 259 261 263 265 267 269 271 273 275 277 279 281 283 285 287 291 293 295 297 299 301 305 306 307 311 312 313 317 318 319 323 325 329 330 331 335 336 337 341 342 343 347 348 349 353 354 355 359 360 365 366 367 371 372 373 377 378 379 383 384 385 389 390 391 395 396 397 400 401 402 403 404 407 409 412 413 414 415 416 419 421 424 425 426 427 428 431 433 436 437 438 439 440 441 443 445 448 449 450 451 452 455 457 460 461 462 463 464 467 469 472 473 474 475 476 479 481 485 486 487 488 491 493 496 497 498 499 500 503 508 509 511 512 517 521 522 523 524 525 527 530 532 533 534 536 539 540 541 544 546 547 548 550 551 553 555 556 557 558 559 563 568 569 571 572 576 577 581 582 583 584 585 587 589 590 592 593 594 596 599 600 601 604 607 608 610 611 612 613 615 616 617 619 623 624 625 628 629 630 631 632 636 637 641 643 644 645 647 648 649 650 652 653 656 659 661 664 667 668 670 671 672 673 675 677 679 683 684 688 689 690 691 692 696 697 701 703 704 705 708 709 710 712 713 714 716 719 724 727 729 730 731 732 733 736 737 739 742 743 744 748 750 751 752 757 761 764 765 767 768 769 772 773 776 777 779 781 784 787 788 790 792 793 795 796 797 798 799 803 804 805 809 810 811 817 819 821 823 825 826 827 828 829 830 836 839 844 850 851 852 853 854 855 857 859 861 863 869 870 871 875 876 877 880 881 882 883 884 885 887 890 892 893 896 899 900 901 903 907 908 909 911 913 915 916 918 919 920 923 927 929 930 932 936 937 938 941 943 945 947 948 949 950 952 953 954 956 960 963 964 966 967 970 971 975 977 979 980 981 983 987 988 989 991 994 996 997 999 1000
There you go.
Now let`s revive this thread, t'was fun.
Please don`t tell me i got the brute force wrong
john9blue wrote:As you can see, an odd number represents the locker being open, and an even number represents the locker being closed.
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
LOL! You have lots of free time, I guess.
El Capitan X wrote:The people in flame wars just seem to get dimmer and dimmer. Seriously though, I love your style, always a good read.
Haggis_McMutton wrote:Holy shit, i was hopping you'd have a more erm succinct solution
LOL! You have lots of free time, I guess.
Actually, it only took 5 minutes.
#include<fstream.h>
ofstream out("1001.txt");
int i, v[1001],j;
void main ()
{
for(i=2;i<=100;i++)
{
for(j=i;j<=1000;j=j+i)
{
if(v[j])
v[j]=0;
else
v[j]=1;
}
}
for(i=1;i<=1000;i++)
if(!v[i])
out<<i<<" ";
}
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
john9blue wrote:Haggis_McMutton wrote:Holy shit, i was hopping you'd have a more erm succinct solution
LOL! You have lots of free time, I guess.
Actually, it only took 5 minutes.
#include<fstream.h>
ofstream out("1001.txt");
int i, v[1001],j;
void main ()
{
for(i=2;i<=100;i++)
{
for(j=i;j<=1000;j=j+i)
{
if(v[j])
v[j]=0;
else
v[j]=1;
}
}
for(i=1;i<=1000;i++)
if(!v[i])
out<<i<<" ";
}
Cheater! That's not brute force, that's using your head!![]()
I can't do much computer programming (except TI basic, but I left my calculator at college), but after next semester, I'll know Java (and it looks like that's what you're using).
InkL0sed wrote:I believe that's C++, actually.
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
El Capitan X wrote:The people in flame wars just seem to get dimmer and dimmer. Seriously though, I love your style, always a good read.