NowCoder Winter Camp 2024: Competitive Programming Solutions
Prime Product Finder
Determine three distinct prime numbers between 1 and 100 whose product lies within a given range [l, r]. If no valid triplet exists, output -1.
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
bool check_prime(int num) {
if (num < 2) return false;
for (int i = 2; i * ...
Posted on Wed, 26 Aug 2026 16:39:12 +0000 by kante
Solving the Ternary Goldbach Conjecture via Sieve of Eratosthenes
The Ternary Goldbach Conjecture asserts that any odd integer greater than 7 can be represented as the sum of three prime numbers. While proven for sufficiently large numbers, verifying this for smaller integers requires an effiicent computational approach. Given an odd integer n (9 < n < 20,000), our objective is to find a triplet of prim ...
Posted on Thu, 06 Aug 2026 16:46:07 +0000 by santrowithu