The Ctrl + V Game

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,235
Trophies
2
Location
Tree
XP
3,531
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

Active Member
Newcomer
Joined
Jan 17, 2022
Messages
44
Trophies
0
Age
16
XP
195
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,912
Trophies
2
XP
29,729
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
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Thanks for signing up at LinusTechTips
  • QuarterCut @ QuarterCut:
    holey shmoley!
  • BigOnYa @ BigOnYa:
    Your credit card has been charged. Thank you.
  • K3Nv2 @ K3Nv2:
    Your screwdriverPlus will arrive in three weeks
    +1
  • QuarterCut @ QuarterCut:
    K64_Waddle_Dee_Artwork_1.jpg

    my reaction to such information
    +2
  • BigOnYa @ BigOnYa:
    Press 1 for English. Press 2 for Pig Latin. Or press 3 to speak to a representative.
  • BakerMan @ BakerMan:
    guys, i need help, i got into an argument about what genre radioactive is, and i forgot who made it
  • Sicklyboy @ Sicklyboy:
    @BakerMan, Imagine Dragons
  • Sicklyboy @ Sicklyboy:
    Dragon deez nuts across yo face GOTEEM
  • Sicklyboy @ Sicklyboy:
    lmao now I realize that was probably the joke in the first place
    +1
  • BakerMan @ BakerMan:
    IMAGINE DRAGON DEEZ NUTS ACROSS YO- FUCK HE BEAT ME TO IT
  • BigOnYa @ BigOnYa:
    You have selected 4 - Death by Snu Snu, please stand by...
    +1
  • BakerMan @ BakerMan:
    lucky bastard
    +1
  • Sicklyboy @ Sicklyboy:
    hahahaha I'm half way through a bag off my Volcano and my tolerance is way down because I haven't been smoking much lately, so I was a little slow to catch that that was what your angle was 🤣🤣
    +1
  • Sicklyboy @ Sicklyboy:
    Also I was just excited to know a music reference for once (I am the LAST person in the world that you want on your trivia team)
    +2
  • K3Nv2 @ K3Nv2:
    Bummer webos 7.4 isnt working with dejavuln-autoroot
  • Sicklyboy @ Sicklyboy:
    PS4 right? I think that's what mine's on. Or 5.6, maybe.
  • K3Nv2 @ K3Nv2:
    [!] Installation failed (devmode_enabled not recognized)
  • K3Nv2 @ K3Nv2:
    0.5 seemed to work whatever lol i wont bitch
  • Alysh_Graham @ Alysh_Graham:
    Hehehe
    Alysh_Graham @ Alysh_Graham: Hehehe