Coder Social home page Coder Social logo

saptarshi-prog / consecutive-prime-sum-codevita Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 3 KB

This repository contains my program for TCS code vita question of consecutive prime sums.

Home Page: https://www.linkedin.com/in/saptarshi-neogi-04461416b/

License: MIT License

Python 100.00%
consecutive-sum-of-primes tcs-codevita codevita-solutions python codevita-questions competitive-programming competitive-programming-contests

consecutive-prime-sum-codevita's Introduction

Consecutive-prime-sum-codevita

This repository contains my program for tcs codevita question of consecutive prime sums.

Some prime numbers can be expressed as a sum of other consecutive prime numbers.

For example 5 = 2 + 3, 17 = 2 + 3 + 5 + 7, 41 = 2 + 3 + 5 + 7 + 11 + 13.

Your task is to find out how many prime numbers which satisfy this property are present in the range 3 to N subject to a constraint that summation should always start with number 2. Write code to find out the number of prime numbers that satisfy the above-mentioned property in a given range.

Input Format:

First line contains a number N

Output Format:

Print the total number of all such prime numbers which are less than or equal to N.

Constraints: 2<N<=12,000,000,000

consecutive-prime-sum-codevita's People

Contributors

saptarshi-prog avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.