Skip to content

Commit d26fa1f

Browse files
committed
Create problem28.java
1 parent a1e58b4 commit d26fa1f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

problem28.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
Solved by
3+
Aravinth T
4+
111712205011
5+
IT Dept
6+
*/
7+
8+
import java.util.Scanner;
9+
10+
/**
11+
*
12+
*/
13+
14+
/**
15+
* @author aravinth
16+
*
17+
*/
18+
public class notpresent
19+
{
20+
21+
/**
22+
* @param args
23+
*/
24+
public static void main(String[] args)
25+
{
26+
Scanner s=new Scanner(System.in);
27+
int n=s.nextInt();
28+
int arr[]=new int[n];
29+
for(int i=0;i<n;i++)
30+
arr[s.nextInt()-1]=1;
31+
for(int i=0;i<n;i++)
32+
if(arr[i]==0)
33+
System.out.println(i+1);
34+
35+
}
36+
37+
}

0 commit comments

Comments
 (0)