about summary refs log tree commit diff
path: root/others/mHoang20150916/pfactor.c
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-01-01 20:42:05 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-01-01 20:42:05 +0700
commitc67182c04491f2cf8b67e78b68aebf32aea25470 (patch)
treed82d7fd5478dffb1348143c67cbb330955dbf0f8 /others/mHoang20150916/pfactor.c
parent70f37066d2d368a2810a2be209ae0bd8b391293b (diff)
downloadcp-c67182c04491f2cf8b67e78b68aebf32aea25470.tar.gz
Update others/{mHoang,mkcal}
Diffstat (limited to 'others/mHoang20150916/pfactor.c')
-rw-r--r--others/mHoang20150916/pfactor.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/others/mHoang20150916/pfactor.c b/others/mHoang20150916/pfactor.c
deleted file mode 100644
index fee50b5..0000000
--- a/others/mHoang20150916/pfactor.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-#include <math.h>
-
-int main()
-{
-	long long n, sqrtn;
-	long i, tmp;
-
-	scanf("%lld", &n);
-	sqrtn = sqrt(n);
-
-	for (i = 2; i <= sqrtn && n > 1; i++)
-		while (n % i == 0) {
-			n /= i;
-			tmp = i;
-		}
-
-	printf("%lld\n", (n == 1) ? tmp : n);
-
-	return 0;
-}