JCC25 Contest 1 P4 - Periodic Groups
Submit solution
Points:
5 (partial)
Time limit:
1.0s
Memory limit:
256M
Author:
Problem type
Allowed languages
Assembly, Awk, Brain****, C, C++, Java, Lua, Pascal, Perl, PyPy 2, PyPy 3, Python, Sed
Jason is trying to find which group of the periodic table an element belongs to.
The group of an element is determined by the amount of protons it has.
For example, Hydrogen is in group 1 while oxygen is in group 16
Given an element with atomic number (the amount of protons it has) \(N\) , determine its group.
Constraints
Subtask 1 [40%]
\(19 \le N \le 54\)
Subtask 2 [30%]
\(3 \le N \le 54\)
Subtask 3 [30%]
\(1 \le N \le 54\)
Input Specification
The input contains one integer, \(N\)
Output Specification
Output the one integer, the group that an element with atomic number \(N\) belongs to
Sample Input
19
Sample Output
1
Explanation for Sample Output
The element with atomic number 19 is Potassium and belongs to group 1
Sample Input
2
Sample Output
18
Explanation for Sample Output
The element with atomic number 2 is Helium and belongs to group 18
Comments