Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
First Contributions
first-contributions
Merge requests
!20679
New Python file added to check for Duplicates
Code
Review changes
Check out branch
Download
Email patches
Plain diff
Closed
Administrator
requested to merge
github/fork/vineetnayak777/vineet
into
master
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Created by: vineetnayak777
0
0
Compare
master
master (base)
and
latest version
latest version
f73c590b
1 commit,
2 years ago
1 file
+
25
-
0
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
dup.py
0 → 100644
+
25
-
0
Options
View file @ f73c590b
print
(
"Enter N"
)
n
=
int
(
input
())
flag
=
0
flag1
=
0
num
=
[]
for
i
in
range
(
n
):
num
.
append
(
int
(
input
()))
dic
=
{}
for
i
in
num
:
try
:
dic
[
i
]
+=
1
except
:
dic
[
i
]
=
1
for
key
,
value
in
dic
.
items
():
if
(
value
!=
1
):
if
(
flag
==
0
):
print
(
"Duplicate Numbers"
)
flag
=
flag
+
1
print
(
key
)
else
:
if
(
flag1
==
0
):
print
(
"Non Duplicate Numbers"
)
flag1
=
flag1
+
1
print
(
key
)
Menu
Explore
Projects
Groups
Snippets