allcoding1
22.5K subscribers
2.19K photos
2 videos
77 files
909 links
Download Telegram
Only 2

Deloitte exam 5pm

Telegram:- @allcoding1
👍3
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int start = sc.nextInt(); // @allcoding1 read in the start of the range
int end = sc.nextInt(); // read in the end of the range

// loop through the range of numbers
for (int i = start; i <= end; i++) {
System.out.println(Integer.toBinaryString(i)); // print the binary representation of the number
}
}
}

Java code

Deloitte exam 5pm

Telegram:- @allcoding1
👍8👎5
def no_consecutive_ones(n: int) -> bool:

bin_n = bin(n)[2:]

for i in range(len(bin_n)-1):
if bin_n[i] == '1' and bin_n[i+1] == '1':
return False
return True


m, n = map(int, input().split())

for i in range(m+1, n):
if no_consecutive_ones(i):
print(bin(i)[2:])

Python
Telegram - @allcoding1
👍6
Python

1st line 👇
m, n= map(int, input (). split ())

Deloitte exam 5pm
@allcoding1

https://instagram.com/allcoding1_official?igshid=OGQ2MjdiOTE=
👍9
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍34
B

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍1
D

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
26
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍1👎1
81
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
30
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
B
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
Non of the above

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
Son in law

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
4
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍1
Saturday

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍1😁1
T
DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1
👍5
Web browsers

DELOITTE EXAM 8PM ANS

Telegram:- @allcoding1