• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:42
CEST 12:42
KST 19:42
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
BGE Stara Zagora 2025: Info & Preview11Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL44Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
GSL Ro4 and Finals moved to Sunday June 15th10Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results26Code S RO12 Results + RO8 Groups (2025 Season 2)3Weekly Cups (May 19-25): Hindsight is 20/20?0
StarCraft 2
General
GSL Ro4 and Finals moved to Sunday June 15th Jim claims he and Firefly were involved in match-fixing Serious Question: Mech BGE Stara Zagora 2025: Info & Preview I made a 5.0.12/5.0.13 replay fix
Tourneys
Bellum Gens Elite: Stara Zagora 2025 Sparkling Tuna Cup - Weekly Open Tournament SOOP Starcraft Global #21 $5,100+ SEL Season 2 Championship (SC: Evo) WardiTV Mondays
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void
Brood War
General
Will foreigners ever be able to challenge Koreans? BW General Discussion FlaSh Witnesses SCV Pull Off the Impossible vs Shu BGH auto balance -> http://bghmmr.eu/ Battle.net is not working
Tourneys
[ASL19] Grand Finals Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET [Megathread] Daily Proleagues
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Monster Hunter Wilds Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Mechabellum
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread TL Mafia Plays: Diplomacy TL Mafia: Generative Agents Showdown Survivor II: The Amazon
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread European Politico-economics QA Mega-thread Canadian Politics Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard
TL Community
The Automated Ban List
Blogs
Heero Yuy & the Tax…
KrillinFromwales
Research study on team perfo…
TrAiDoS
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Info SLEgma_12
SLEgma_12
Customize Sidebar...

Website Feedback

Closed Threads



Active: 17060 users

C Programming Practice - Page 3

Blogs > CecilSunkure
Post a Reply
Prev 1 2 3 4 Next All
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
November 04 2012 08:29 GMT
#41
On November 04 2012 07:25 Lysenko wrote:
Show nested quote +
On November 04 2012 04:15 CecilSunkure wrote:
On November 04 2012 02:09 Sawamura wrote:
now if could write some C++ program practice ^_^ hehehe thanks for the practice anyway 5/5

I could do that. I'm thinking of some object oriented C first though. You know, virtualizing some C++ features in C.


I was on my way to a much longer post, but I don't want to get in the way of what you're doing here with a lot of negativity, so I'll just ask. Who learns C today, absent a specific need to write embedded code, modify a UNIX or Linux kernel, or write a driver?

I'm speaking as someone who paid several years of bills as a C programmer, working on both embedded applications and desktop applications. This was, however, 17 years ago, before (as far as I have personally seen, which is why I'm asking) the entire world moved on to C++.



** I mean, I can see doing it out of nostalgia, or because I got a cheap deal on some single-chip-computer development board, but that's about it. Is this a topic of interest for typical, highly-motivated CS students these days? I'm not saying it's bad, I just don't get it.

You learn C to work with the crappy old codebase many companies still have. If you start a new project from scratch, you better have a damn good reason to use C. But if you work on something that uses old code, chances are it uses C.

That's no reason to start with C as your first language though.
If you have a good reason to disagree with the above, please tell me. Thank you.
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
Last Edited: 2012-11-04 17:55:38
November 04 2012 09:06 GMT
#42
Hijacking this thread for a little bit:
When I'm done with High School I have a couple of months vacation and I'd like to teach myself how to program. Iit seems like a very useful skill and like something I would enjoy doing. With what language should I start? And I assume once you have learnt one, the others are easier to learn?
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
November 04 2012 09:09 GMT
#43
On November 04 2012 18:06 Recognizable wrote:
Hijacking this thread for a little bit:
When I'm done with High School I have a couple of months vacation and I'd like to teach myself how to programme. Iit seems like a very useful skill and like something I would enjoy doing. With what language should I start? And I assume once you have learnt one, the others are easier to learn?


I've recently learnt programming myself, and I would recommend two things:
1. A steep learning curve, but learning it properly: starting with C then going to C++
2. An easy language that can be useful, and can certainly teach you how programming works: Python

You can learn the latter one on www.codecademy.org

It's easier to start with Python, but I think you learn it a lot better if you just start with C. (this is what professors at my university says, but our classes start with Python)
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
November 04 2012 12:11 GMT
#44
You aren't doing yourself any favors by starting with C. You're most likely not even going to learn how to code properly in C.
Start with C# or Java but make sure you learn about reference types and value types.
If you have a good reason to disagree with the above, please tell me. Thank you.
Lysenko
Profile Blog Joined April 2010
Iceland2128 Posts
Last Edited: 2012-11-04 12:38:20
November 04 2012 12:27 GMT
#45
I say start with Python. As I mentioned above, the top tech schools are using it, a lot of the details resemble other more challenging languages, but you'll be building fun stuff a lot faster with it and it has significant value in the real world once you get out of school.

That said, if you're learning for yourself, do whatever sounds like fun!! Learn C, or hell, learn your favorite processor's assembler code. My own path went from Fortran to Applesoft Basic to Apple Pascal to 6502 assembler to Ada (which is what advanced CS students were learning at Harvey Mudd when I started in 1987) to Object Pascal to 68000 assembler to C to C++ to Perl to Objective C to Java to Python. Basically I just learned whatever was convenient and worked well on the platform I had available at any given time to let me do something fun.

It's worth trying out a range of languages, though. They differ in what they do well and it will make new languages easier to pick up. That said, Python is still an awesome place to start these days, it's pretty modern, works on just about any computer, and is very quick to get started with.
http://en.wikipedia.org/wiki/Lysenkoism
kirika80
Profile Joined May 2011
Israel17 Posts
November 04 2012 12:38 GMT
#46
If you want little programming exercises to learn a new language, I recommend using Project Euler (http://projecteuler.net/http://projecteuler.net/).
It's a set of problems that can be solved in any language you want, and once you solve each one you get access to a "forum" discussing the different solutions in different languages for that problem. Really cool.
Lysenko
Profile Blog Joined April 2010
Iceland2128 Posts
November 04 2012 12:41 GMT
#47
On November 04 2012 17:29 spinesheath wrote:
Show nested quote +
On November 04 2012 07:25 Lysenko wrote:
On November 04 2012 04:15 CecilSunkure wrote:
On November 04 2012 02:09 Sawamura wrote:
now if could write some C++ program practice ^_^ hehehe thanks for the practice anyway 5/5

I could do that. I'm thinking of some object oriented C first though. You know, virtualizing some C++ features in C.


I was on my way to a much longer post, but I don't want to get in the way of what you're doing here with a lot of negativity, so I'll just ask. Who learns C today, absent a specific need to write embedded code, modify a UNIX or Linux kernel, or write a driver?

I'm speaking as someone who paid several years of bills as a C programmer, working on both embedded applications and desktop applications. This was, however, 17 years ago, before (as far as I have personally seen, which is why I'm asking) the entire world moved on to C++.



** I mean, I can see doing it out of nostalgia, or because I got a cheap deal on some single-chip-computer development board, but that's about it. Is this a topic of interest for typical, highly-motivated CS students these days? I'm not saying it's bad, I just don't get it.

You learn C to work with the crappy old codebase many companies still have. If you start a new project from scratch, you better have a damn good reason to use C. But if you work on something that uses old code, chances are it uses C.

That's no reason to start with C as your first language though.


Sure, I agree, but the first language question is what I was getting at.
http://en.wikipedia.org/wiki/Lysenkoism
yeastiality
Profile Joined April 2011
Canada374 Posts
November 04 2012 16:11 GMT
#48
On November 04 2012 17:29 spinesheath wrote:
Show nested quote +
On November 04 2012 07:25 Lysenko wrote:
On November 04 2012 04:15 CecilSunkure wrote:
On November 04 2012 02:09 Sawamura wrote:
now if could write some C++ program practice ^_^ hehehe thanks for the practice anyway 5/5

I could do that. I'm thinking of some object oriented C first though. You know, virtualizing some C++ features in C.


I was on my way to a much longer post, but I don't want to get in the way of what you're doing here with a lot of negativity, so I'll just ask. Who learns C today, absent a specific need to write embedded code, modify a UNIX or Linux kernel, or write a driver?

I'm speaking as someone who paid several years of bills as a C programmer, working on both embedded applications and desktop applications. This was, however, 17 years ago, before (as far as I have personally seen, which is why I'm asking) the entire world moved on to C++.



** I mean, I can see doing it out of nostalgia, or because I got a cheap deal on some single-chip-computer development board, but that's about it. Is this a topic of interest for typical, highly-motivated CS students these days? I'm not saying it's bad, I just don't get it.

You learn C to work with the crappy old codebase many companies still have. If you start a new project from scratch, you better have a damn good reason to use C. But if you work on something that uses old code, chances are it uses C.

That's no reason to start with C as your first language though.


how about if I work on really low-footprint embedded applications where it's the only option, and also the only plausible option?

C is beautiful because it lets you in on what it's doing at a low level. It lets you abstract things *enough* to make good designs, but not so much that you trade all your performance for elegance.

I'm sure lots of companies are developing new code from scratch right now, because cheap mass-produced CPUs don't tend to run lisp interpreters and stuff. For many people in the 'modern' CS/programming world, C will be the "hardest" language they learn that anyone in industry cares about...that's a good reason to learn it if you want to work as a generalist. If you're more interested in pursuing your own projects, or doing something in academia, you can be much more selective about what you learn (i.e. stack-based, functional, etc.. language types).
dementrio
Profile Joined November 2010
678 Posts
November 04 2012 16:32 GMT
#49
Hey, if you like C, it's cool, I'm not one to judge. But what about the children? What do you think all this glorification of C is going to lead them to? What's next, I'll tell you what's next, those kids are going to grow up thinking that C is OK, and that undermines the core of our society, which is getting things done.

Look at me, I started out with c because of peer pressure. Now I earned the right to say that really made me understand how things really work. Except it didn't. What it did do instead was making everything mind-numbingly tedious so that I never could actually do anything worthwhile - but I was too stubborn to drop it for a long while because after all that's the way real men write code. Don't be me, pick up the tool that you need for the job, and I guarantee you when you actually want to do something for which C is actually the best tool, it won't be any harder to learn. Plus at that point you might even not have given up already.
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
Last Edited: 2012-11-04 18:06:40
November 04 2012 18:00 GMT
#50
On November 04 2012 21:27 Lysenko wrote:
I say start with Python. As I mentioned above, the top tech schools are using it, a lot of the details resemble other more challenging languages, but you'll be building fun stuff a lot faster with it and it has significant value in the real world once you get out of school.

That said, if you're learning for yourself, do whatever sounds like fun!! Learn C, or hell, learn your favorite processor's assembler code. My own path went from Fortran to Applesoft Basic to Apple Pascal to 6502 assembler to Ada (which is what advanced CS students were learning at Harvey Mudd when I started in 1987) to Object Pascal to 68000 assembler to C to C++ to Perl to Objective C to Java to Python. Basically I just learned whatever was convenient and worked well on the platform I had available at any given time to let me do something fun.

It's worth trying out a range of languages, though. They differ in what they do well and it will make new languages easier to pick up. That said, Python is still an awesome place to start these days, it's pretty modern, works on just about any computer, and is very quick to get started with.


I guess I'll start with Python and maybe Java(because I already spent an hour messing around with that). Why are there so many different programming languages anyway? I'm learning for myself, I don't plan on studying Computer Science, probably gonna study Physics. But I've always found it interesting for some reason so I'd like to give it a shot.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2012-11-04 19:10:43
November 04 2012 19:02 GMT
#51
On November 05 2012 03:00 Recognizable wrote:
Show nested quote +
On November 04 2012 21:27 Lysenko wrote:
I say start with Python. As I mentioned above, the top tech schools are using it, a lot of the details resemble other more challenging languages, but you'll be building fun stuff a lot faster with it and it has significant value in the real world once you get out of school.

That said, if you're learning for yourself, do whatever sounds like fun!! Learn C, or hell, learn your favorite processor's assembler code. My own path went from Fortran to Applesoft Basic to Apple Pascal to 6502 assembler to Ada (which is what advanced CS students were learning at Harvey Mudd when I started in 1987) to Object Pascal to 68000 assembler to C to C++ to Perl to Objective C to Java to Python. Basically I just learned whatever was convenient and worked well on the platform I had available at any given time to let me do something fun.

It's worth trying out a range of languages, though. They differ in what they do well and it will make new languages easier to pick up. That said, Python is still an awesome place to start these days, it's pretty modern, works on just about any computer, and is very quick to get started with.


I guess I'll start with Python and maybe Java(because I already spent an hour messing around with that). Why are there so many different programming languages anyway? I'm learning for myself, I don't plan on studying Computer Science, probably gonna study Physics. But I've always found it interesting for some reason so I'd like to give it a shot.

A lot of it is due to history. The first languages were obviously very close to machine code, see Assembler. Then slowly people started to realize that they could introduce higher levels of abstraction (like C, C++, C#) to make programming easier, faster (as in the time spent on writing code), and less error prone. A lot of languages were developed to represent the increasing levels of abstraction as time went on and innovations in computer science came up. Computer science is still fairly young, there will still be lots of development which will lead to new languages which support concepts that would be hard to express in other languages (technically you can emulate the stuff in C++ or C# with C, but it's a LOT more work).

Then there are languages which were developed to make programming in a certain environment easy.

Lately we've seen a rise of functional programming languages which represent the logical/mathematical approaches more closely.

The upcoming languages will probably mostly try to deal with the increasing hardware parallelism, which isn't really handled natively in any of the current mainstream languages. Ideally the compiler would produce good parallel code without the programmer having to worry about it at all. Right now you always have to do some work to get your programs to run efficiently on multiple threads.
If you have a good reason to disagree with the above, please tell me. Thank you.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2012-11-04 23:26:16
November 04 2012 22:29 GMT
#52
I don't remember pointer intricacies D:
Props to those few of you that do this stuff in spare time.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
i.of.the.storm
Profile Joined April 2009
United States795 Posts
November 04 2012 23:33 GMT
#53
Personally I think C++ is way worse as a first language than C, but that's just me. I would go for Python, to start out and then move to Java or C and teach them about memory and pointers and all that good stuff. It's important to know for sure but when just starting out it only gets in the way. When starting out I think it's really important to be able to do interesting things quickly and easily.
Maru - The Terran hope is alive!
teamamerica
Profile Blog Joined July 2010
United States958 Posts
November 05 2012 00:23 GMT
#54
On November 05 2012 03:00 Recognizable wrote:
Show nested quote +
On November 04 2012 21:27 Lysenko wrote:
I say start with Python. As I mentioned above, the top tech schools are using it, a lot of the details resemble other more challenging languages, but you'll be building fun stuff a lot faster with it and it has significant value in the real world once you get out of school.

That said, if you're learning for yourself, do whatever sounds like fun!! Learn C, or hell, learn your favorite processor's assembler code. My own path went from Fortran to Applesoft Basic to Apple Pascal to 6502 assembler to Ada (which is what advanced CS students were learning at Harvey Mudd when I started in 1987) to Object Pascal to 68000 assembler to C to C++ to Perl to Objective C to Java to Python. Basically I just learned whatever was convenient and worked well on the platform I had available at any given time to let me do something fun.

It's worth trying out a range of languages, though. They differ in what they do well and it will make new languages easier to pick up. That said, Python is still an awesome place to start these days, it's pretty modern, works on just about any computer, and is very quick to get started with.


I guess I'll start with Python and maybe Java(because I already spent an hour messing around with that). Why are there so many different programming languages anyway? I'm learning for myself, I don't plan on studying Computer Science, probably gonna study Physics. But I've always found it interesting for some reason so I'd like to give it a shot.


Go Python or Matlab imo. Both you might use for doing physics work anyway later. They both allow you to skip the intro to methods before learning variables, and both let you get stuff done quickly. I don't see a reason to learn Java if you're going to work on Python - just focus on that (if that's the one you like).
RIP GOMTV. RIP PROLEAGUE.
blade55555
Profile Blog Joined March 2009
United States17423 Posts
Last Edited: 2012-11-05 03:09:31
November 05 2012 02:59 GMT
#55
On November 04 2012 18:06 Recognizable wrote:
Hijacking this thread for a little bit:
When I'm done with High School I have a couple of months vacation and I'd like to teach myself how to program. Iit seems like a very useful skill and like something I would enjoy doing. With what language should I start? And I assume once you have learnt one, the others are easier to learn?

I'm currently teaching myself Cplusplus (phone doesn't have plus sign lol). It's not that bad at least so far. Been only 4 days and in still at basics. I am learning from a set of tutorials by a guy named Bucky who's really good at explaining it. If you want a link or something let me know. I know everytime I have asked what language to start out with most say C#. I would recommend not C as it gives you bad habits. I know multiple books when I was younger always said not to start C as it gives really bad habits and forums. If you want links let me know!
When I think of something else, something will go here
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2012-11-05 04:23:44
November 05 2012 04:09 GMT
#56
On November 04 2012 21:38 kirika80 wrote:
If you want little programming exercises to learn a new language, I recommend using Project Euler (http://projecteuler.net/http://projecteuler.net/).
It's a set of problems that can be solved in any language you want, and once you solve each one you get access to a "forum" discussing the different solutions in different languages for that problem. Really cool.

I just solved the first 2 in R. The third one looks really hard. How do you find the biggest prime factor of a large number in under a minute?

http://projecteuler.net/problem=3

I hate you. Now I'm going to be thinking about it. I could do the problem with a list of prime factors going up to the square root of the number in question, but other than that I see no way of solving the problem in under a minute.

Finding prime numbers in and of itself is not easy to do. The only way I know how is to use sieve method. But that takes ungodly amounts of time.

For all I know the largest prime of 600851475143 is 775143. I could easily check if 775143 is a prime but even if it wasn't, I'd then have to check if 775141 was a prime. FUCK

I would not recommend learning a language with these exercises. They're meant for masochists, not for learning languages.


Is that how you do the question? With a list. Dumb question doesn't say what I can use. Actually, no, I can do it with sieve. nvm.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
frogmelter
Profile Blog Joined April 2009
United States971 Posts
Last Edited: 2012-11-05 04:55:25
November 05 2012 04:23 GMT
#57
On November 05 2012 13:09 obesechicken13 wrote:
Show nested quote +
On November 04 2012 21:38 kirika80 wrote:
If you want little programming exercises to learn a new language, I recommend using Project Euler (http://projecteuler.net/http://projecteuler.net/).
It's a set of problems that can be solved in any language you want, and once you solve each one you get access to a "forum" discussing the different solutions in different languages for that problem. Really cool.

I just solved the first 2 in R. The third one looks really hard. How do you find the biggest prime factor of a large number in under a minute?

http://projecteuler.net/problem=3

I hate you. Now I'm going to be thinking about it. I could do the problem with a list of prime factors going up to the square root of the number in question, but other than that I see no way of solving the problem in under a minute.

Finding prime numbers in and of itself is not easy to do. The only way I know how is to use sieve method. But that takes ungodly amounts of time.

For all I know the largest prime of 600851475143 is 775143. I could easily check if 775143 is a prime but even if it wasn't, I'd then have to check if 775141 was a prime. FUCK

I would not recommend learning a language with these exercises. They're meant for masochists, not for learning languages.


Is that how you do the question? With a list. Dumb question doesn't say what I can use.


Biggest prime factor is not difficult.

Do something like

for (int i = 2; i * i <= number; i++)
{
while (i%number == 0)
{
number = number / i;
}
}

printf("The greatest prime factor is %d\n", number);


I haven't tested this, but I've coded something similar recently. It can find the prime factors of 9,223,372,036,854,775,808 pretty fast [sub 5 seconds]

Two improvements that could be made:
1) Code a case to check if it is a prime number to begin with. If it isn't, then enter the loop
2) Code a case to check for divisibility of 2's, since all even divisors are divisible by two. Then you can modify the loop to start like: for (int i = 3; i < number * number; i = i + 2)

This makes it around twice as fast since you are only checking for positive odd real numbers, instead of all positive reals

Your output can be verified at wolfram alpha

http://www.wolframalpha.com/input/?i=prime factors of 600851475143
TL+ Member
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2012-11-05 04:28:59
November 05 2012 04:25 GMT
#58
1) Code a case to check if it is a prime number to begin with. If it isn't, then enter the loop

If I could do this I'd be a millionaire.


It can find the prime factors of 9,223,372,036,854,775,808 pretty fast [sub 5 seconds].

Lol. I don't know if you're trolling or if you misunderstand the problem. But That number above has only one prime factor: 2.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
frogmelter
Profile Blog Joined April 2009
United States971 Posts
Last Edited: 2012-11-05 04:27:58
November 05 2012 04:27 GMT
#59
On November 05 2012 13:25 obesechicken13 wrote:
Show nested quote +
1) Code a case to check if it is a prime number to begin with. If it isn't, then enter the loop

If I could do this I'd be a millionaire


How about I make you a deal.

I'll teach you primality tests, and you split me half the million dollars
TL+ Member
frogmelter
Profile Blog Joined April 2009
United States971 Posts
Last Edited: 2012-11-05 04:32:15
November 05 2012 04:31 GMT
#60
On November 05 2012 13:25 obesechicken13 wrote:
Show nested quote +
1) Code a case to check if it is a prime number to begin with. If it isn't, then enter the loop

If I could do this I'd be a millionaire.


Show nested quote +
It can find the prime factors of 9,223,372,036,854,775,808 pretty fast [sub 5 seconds].

Lol. I don't know if you're trolling or if you misunderstand the problem. But That number above has only one prime factor: 2.


I'm not trolling.

Since the algorithm divides, it will come up with the answer pretty fast. The factors are 2^63, and every pass will divide it by 2. Meaning the loop only needs to run 63 times.

The problem occurs when you have a huge jump, like the first prime factor is like 6,000,000,000+ or so.
TL+ Member
Prev 1 2 3 4 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 18m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
EnDerr 112
StarCraft: Brood War
Calm 7456
Sea 5382
Jaedong 1803
Bisu 1562
Horang2 1139
Hyuk 840
Pusan 470
EffOrt 247
Zeus 182
Light 137
[ Show more ]
Dewaltoss 121
Last 115
Mini 105
hero 96
Rush 86
ZerO 72
Leta 60
ggaemo 54
Hyun 45
ToSsGirL 40
Killer 31
sSak 30
Sharp 25
Mong 17
Shine 16
GoRush 15
Backho 14
Free 14
Yoon 13
HiyA 12
ajuk12(nOOB) 12
Stork 11
JulyZerg 8
SilentControl 5
Dota 2
XcaliburYe949
BananaSlamJamma426
Fuzer 196
PGG 151
Counter-Strike
shoxiejesuss1040
x6flipin245
Super Smash Bros
Mew2King108
Other Games
singsing1457
ceh9595
Pyrionflax158
crisheroes154
XaKoH 105
ZerO(Twitch)16
Has14
ArmadaUGS6
Organizations
Dota 2
PGL Dota 2 - Main Stream2048
Other Games
gamesdonequick642
StarCraft: Brood War
UltimateBattle 25
lovetv 5
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• StrangeGG 50
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 4
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
WardiTV Qualifier
18m
Bellum Gens Elite
1h 18m
OSC
5h 18m
The PondCast
23h 18m
Bellum Gens Elite
1d
WardiTV Invitational
1d
Replay Cast
1d 13h
OSC
1d 13h
Bellum Gens Elite
2 days
WardiTV Invitational
2 days
[ Show More ]
Replay Cast
2 days
CranKy Ducklings
2 days
SC Evo League
3 days
Bellum Gens Elite
3 days
Fire Grow Cup
3 days
CSO Contender
3 days
Replay Cast
3 days
SOOP
3 days
SHIN vs GuMiho
Sparkling Tuna Cup
3 days
AllThingsProtoss
4 days
Fire Grow Cup
4 days
Replay Cast
4 days
Replay Cast
5 days
Replay Cast
5 days
WardiTV Invitational
6 days
GSL Code S
6 days
Rogue vs GuMiho
Maru vs Solar
Liquipedia Results

Completed

CSL Season 17: Qualifier 1
DreamHack Dallas 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL Season 17: Qualifier 2
2025 GSL S2
Bellum Gens Elite Stara Zagora 2025
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

CSL 17: 2025 SUMMER
Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLAN 2025
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Murky Cup #2
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.