There are N integers in an array A. All but one integer occur in pairs. Your task is to find out the number that occurs only once. Input Format The first line of the input contains an integer N indicating number of integers. The next line contains N …
https://www.hackerrank.com/challenges/lonely-integer def main(): n = int(raw_input()) s = dict() a = 0 arr = map(int,raw_input().strip().split()) for _ in range(n): num = arr[_] if not s.get(num): s.update({num:1}) else: a = s.get(num) a += 1 s.updat…
13. Roman to Integer Easy Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve i…
A. Search for Pretty Integers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given two lists of non-zero digits. Let's call an integer pretty if its (base 10) representation has at…