allcoding1
22.4K subscribers
2.19K photos
2 videos
77 files
912 links
Download Telegram
C++

Telegram:- @allcoding1
👍9
Python

Telegram:- @allcoding1
👍16🤔8
Java
Telegram - @allcoding1
👍4
C++
XOR

Telegram:- @allcoding1
🤔12👍5
Array A length n code
Python
Telegram:- @allcoding1
9👍3
MAX = 10000

# prefix[i] is going to
# store count of primes
# till i (including i).

pt =[0]*(MAX + 1)


def abc():

prime = [1]*(MAX + 1)


p = 2

while(p * p <= MAX):


if (prime[p] == 1):
i = p * 2

while(i <= MAX):

prime[i] = 0

i += p

p+=1

for p in range(2,MAX+1):

pt[p] = pt[p - 1]

if (prime[p]==1):

pt[p]+=1
//@allcoding1
def query(a,b):
return pt[b]-pt[a-1]
n=int(input())
c=0
for i in range(n):
a,b=map(int,input().split())
abc()
c+=query(a,b)
mod=10**9+7
print(c%mod)



prime numbers in range[L,R]

All test cases passed

Telegram :- @allcoding1
👍14😁4
Alex code
Python 3
Telegram:- @allcoding1
👍1
Java
Telegram:- @allcoding1
👍3
Python3

Telegram:- @allcoding1
👍4
(Python3)


Total Number of possible pairs(a,b)


All test cases passes

Telegram:- @allcoding1
👎9🎉4👏3👍1🥰1😢1
C++
Telegram - @allcoding1
October 2022 Jobs notifications 🔔


🎯Infosys 9.5LPA

🎯TCS

🎯 Accenture 3.33LPA

🎯 Amazon 5LPA

🎯 cognizant 4.5 LPA

🎯 Capgemini 4LPA

🎯 Qualcomm 8LPA

🎯 Wipro

🎯 Zoho 4LPA

🎯Alter 6LPA

🎯IBM 5LPA

🎯HCL 4.25 LPA

🎯DXC 4LPA

🎯LTI 4LPA

🎯 KPMG 4LPA

@allcoding1_official

🎯Zeta 3LPA

🎯Theyve 3.5LPA

🎯 Emerson 4LPA

🎯Hexaware 4LPA

🎯 Global Logic 4.2LPA

🎯 Google 7.5LPA

🎯 Pepsico 7LPA

🎯 Phonepe 5LPA

🎯 Sutherland 5.5LPA


Guys♥️

Once check All notifications and apply Now👇👇👇👇

http://www.allcoding1.com


↗️Share with your friends and groups


Telegram:- @allcoding1
👍13👏2
🎯SHL Global Hiring for Freshers as Associate QA Deployment With 3.25 LPA

Job Role : Associate QA – Deployment
Qualification : B.E/B.Tech
Experience : Freshers
Package : 3.25 LPA

Apply Now:- http://www.allcoding1.com

Telegram:- @allcoding1
👍2