We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #12: Highly divisible triangular number
Project Euler #12: Highly divisible triangular number
Sort by
recency
|
121 Discussions
|
Please Login in order to post a comment
include
include
include
using namespace std;
int main() { const int MAX_PRIMES = 1000; vector primes(MAX_PRIMES, 0); primes[0] = 2; primes[1] = 3; primes[2] = 5; primes[3] = 7; int count1 = 4; long long num = 9; while(count1 < MAX_PRIMES) { bool isprime = true; int sqrt_num = sqrt(num);
}
BY TANUSHREE SARKAR
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
int [] primes = new int[1000];
primes[0] = 2; primes[1] = 3; primes[2] = 5; primes[3] = 7; int count1 = 4; int num = 9;
int i = 0;
mainl: while(num <= 1000000) {
}
Scanner in = new Scanner(System.in); int t = in.nextInt(); for(int a0 = 0; a0 < t; a0++){ long n = in.nextLong();
long result = 1; long sum = 1; int count2 = 1;
while(true) {
}
System.out.println(sum); }}}
c# using System;
namespace Solution { class Program { static void Main(string[] args) { int[] primes = new int[1000];
}
java code 100%**
import java.io.; import java.util.;
public class Solution {
}