From 448b05cca30be9366e29a5e4de046c77157e2600 Mon Sep 17 00:00:00 2001 From: tangtang-CYJ <1740438216@qq.com> Date: Sun, 19 Oct 2025 22:37:17 +0800 Subject: [PATCH] Implement prime factorization for two distinct primes Add a program to find the larger prime factor of a product of two distinct primes. --- ...3\240\346\225\260\345\210\206\350\247\243" | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 "\345\276\252\347\216\257\342\200\224\342\200\224\350\264\250\345\233\240\346\225\260\345\210\206\350\247\243" diff --git "a/\345\276\252\347\216\257\342\200\224\342\200\224\350\264\250\345\233\240\346\225\260\345\210\206\350\247\243" "b/\345\276\252\347\216\257\342\200\224\342\200\224\350\264\250\345\233\240\346\225\260\345\210\206\350\247\243" new file mode 100644 index 0000000..cf6a716 --- /dev/null +++ "b/\345\276\252\347\216\257\342\200\224\342\200\224\350\264\250\345\233\240\346\225\260\345\210\206\350\247\243" @@ -0,0 +1,51 @@ +题目描述 +已知正整数 n 是两个不同的质数的乘积,试求出较大的那个质数。 + +输入格式 +输入只有一行,包含一个正整数 n(6 +using namespace std; +int main() { + int n; + cin>>n; + for(int i=2;i<=n;i++) + if(n%i==0) { + cout<