The Ctrl + V Game

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,246
Trophies
2
Location
Tree
XP
3,563
Country
Poland
C:
#include <stdio.h>
#include <time.h>
int main(){
    double i,j;
    double wyn, need = 1.8848013598436708, now = 1.0,x=0,y=0;
    clock_t startT = clock();
    printf("looking for:%.16f\n",need);
    for(i=1;i<1000000;i++){
        for(j=(int)(i*0.54);j>=1;j--){
            //printf("%f / %f = %f, diff:%f\n",i,j,i/j,need - i/j);
            if( need - i/j < now && need - i/j >=0.0000000000000000){
                now = need - i/j;
                x = i;
                y = j;
            }
            if( need - i/j < 0)
                break;
        }
        //printf("\n");
    }
    printf("Closest founding: %d / %d = %.16f\n",(int)x,(int)y,x/y);
    printf("Execution time: %ds\n",((int)((float)(clock()-startT)/CLOCKS_PER_SEC)));
    return 0;
}
Code:
output:
looking for:1.8848013598436708
Closest founding: 685261 / 363572 = 1.8848013598406919
Execution time: 104s
 

K0rbo

Well-Known Member
Newcomer
Joined
Jan 17, 2022
Messages
50
Trophies
0
Age
16
XP
205
Country
United States
Code:
org.tildearrow.furnace - Pattern Data (190)
0
F-204......|
...........|
F-405..ED03|
...........|
...........|
C-304......|
...........|
F-405..ED03|
...........|
...........|
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,944
Trophies
2
XP
30,279
Country
United Kingdom
1705318972085.png

Didn't know it put my screenshot on the clipboard, TIL 🤷
 
  • Wow
Reactions: impeeza

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
    +1
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
  • Psionic Roshambo @ Psionic Roshambo:
    Why so serious!
  • Psionic Roshambo @ Psionic Roshambo:
    @BakerMan, yeah that's about the only reason I would vote for Trump over Biden.
  • Psionic Roshambo @ Psionic Roshambo:
    In my opinion on all other factors they are pretty much the same.
    Psionic Roshambo @ Psionic Roshambo: In my opinion on all other factors they are pretty much the same.