# Project Euler/3

Jump to navigation
Jump to search

**Project Euler Problem 3** is a problem related to factorization. The problem asks for the largest prime factor of a particular number.

*This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.*

## Implementations

### Aheui

This program takes the 12-digit constant as input. It works on Try It Online but unfortunately fails on AheuiChem.

방싹박빠삭빠싸사투빠사빠싹삭ㅇ루 ㅇㅇㅇㅇㅇ귀희멍차속누석썩뻐서차수 ㅇㅇㅇ오ㅇㅇㅇㅇㅇㅇ서ㅇㅇ더너벌벌

### C

If the program generates an error on your computer, you may try replacing `#define lnt long long`

with `#define lnt __int64`

or `#define lnt __int64_t`

, and/or replacing `%lld`

with `%I64d`

. ^{[citation needed]}

#include <stdio.h> #define lnt long long lnt a=600851475143; lnt i=2; int main(){ while(a!=i){ if(a%i==0){ a/=i; }else{ i+=1; } } printf("%lld",i); return 0; }

## See also

Other pages related to prime factors and factorization:

3 | 12 | 21 | 23 |

Adjacent numbered pages:

<< | < | 1 | 2 | 3 | 4 | 5 | 6 | ... | 28 | > | >> |
---|

## External resources

- Prime factor on Wolfram Mathworld
- Prime Factorization on Wolfram Mathworld
- A page on xkcd related to factorization
- Problem 3 on Project Euler Official Website (not available)
- Problem 3 on Project Euler Mirror