🏡 index : github.com/captn3m0/codechef.git

---
category_name: medium
problem_code: CLSUMG
problem_name: 'Sum of Primes'
languages_supported:
    - C
    - CPP14
    - JAVA
    - PYTH
    - 'PYTH 3.5'
    - PYPY
    - CS2
    - 'PAS fpc'
    - 'PAS gpc'
    - RUBY
    - PHP
    - GO
    - NODEJS
    - HASK
    - rust
    - SCALA
    - swift
    - D
    - PERL
    - FORT
    - WSPC
    - ADA
    - CAML
    - ICK
    - BF
    - ASM
    - CLPS
    - PRLG
    - ICON
    - 'SCM qobi'
    - PIKE
    - ST
    - NICE
    - LUA
    - BASH
    - NEM
    - 'LISP sbcl'
    - 'LISP clisp'
    - 'SCM guile'
    - JS
    - ERL
    - TCL
    - kotlin
    - PERL6
    - TEXT
    - 'SCM chicken'
    - CLOJ
    - COB
    - FS
max_timelimit: '1'
source_sizelimit: '50000'
problem_author: avijit_agarwal
problem_tester: null
date_added: 1-04-2018
tags:
    - avijit_agarwal
    - cole2018
    - fft
    - medium
    - sieve
editorial_url: 'https://discuss.codechef.com/problems/CLSUMG'
time:
    view_start_date: 1524062940
    submit_start_date: 1524062940
    visible_start_date: 1524062940
    end_date: 1735669800
    current: 1525454447
is_direct_submittable: false
layout: problem
---
All submissions for this problem are available. $f$ is a function such that $f(x)$ equals the number of ways in which $x$ can be expressed as sum of two prime numbers. For example $f(10) = 2$, as 10 can be expressed as sum of two primes in two ways: $ 3 + 7 = 5 + 5 = 10$. More formally, $f(x)$ is the number of pairs $(a, b)$ such that $0\\le a \\le b