-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZCOSCH.java
77 lines (51 loc) · 1.32 KB
/
ZCOSCH.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import java.util.*;
class zco
{
public static void main(String[]args)
{
Scanner sc=new Scanner(System.in);
int R=sc.nextInt();
if(R>=1&&R<=Math.pow(10,9))
{
if ( R<=50)
{
System.out.println(100);
}
else if ( R>50&&R<=100)
{
System.out.println(50);
}
else
{
System.out.println(0);
}
}
}
}
/*
* All submissions for this problem are available.The ZCO Scholarship Contest has just finished, and you finish with a rank of R. You know that Rank 1 to Rank 50 will get 100% scholarship on the ZCO exam fee and Rank 51 to Rank 100 will get 50%
percentage scholarship on the ZCO exam fee. The rest do not get any scholarship.
What percentage of scholarship will you get ?
Input
Input consist of single line of input containing one integer R
.
Output
Output a single line containing one integer — the percentage of scholarship you will get.
Constraints
1≤R≤109
Example Input 1
49
Example Output 1
100
Explanation 1
Since 1≤49≤50
, answer is 100
percentage scholarship.
Example Input 2
317
Example Output 2
0
Explanation 2
Since 317>100
, you do not get any scholarship.
*/