Hódító / Queosia forum
Hódító / Queosia forum
http://queosia.com
http://hodito.hu

Go Back   Hódító / Queosia forum > Hódító / Queosia forum > Általános beszélgetések > Egyéb
Register Stats Members List Today's Posts

Egyéb Minden, ami máshova nem fér

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 11-22-2010, 13:07
Redback's Avatar
Redback Redback is offline
Member
 
Join Date: Jun 2007
Location: Nyíregyháza
Posts: 2,975
Activity: 0%
Longevity: 92%
Default

Quote:
Originally Posted by BimmBimm View Post
Az általam ismert legjobb módszer, ha csak a szám gyökéig keresed az osztóit.

PHP Code:
int isprime(unsigned int n)
{
    
unsigned int i;
    
unsigned int maxi=sqrt(n);


    for (
i=2;i<=maxi;i++)
    {
        if (
n%i==0) return 0;
    }
    return 
1;

(ez c kód)
na megnézem ezzel

Szerk: Köszi szépen BimmBimm, egész szépen muzsikál! Pár perc alatt 30 milliónál járok Hogy ez miért nem jutott eszembe tegnap... Gugliban néztem, ott is volt gyökig osztás, de akkor nem esett le, hogy mégis miért :/
__________________
Redológia (#455305) [1/A] [SZK]

Non omnis moriar (#701164) [3/G]

Last edited by Redback; 11-22-2010 at 13:59..
Reply With Quote
The Following User Says Thank You to Redback For This Useful Post:
Sponsored Links
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:45.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Design partly based on Hódító's design by Grafinet Team Kft.

Contents and games copyright (c) 1999-2020 - Queosia, Hódító

Partnerek: Játékok, civ.hu