59 lines
3.1 KiB
Plaintext
59 lines
3.1 KiB
Plaintext
;Task:
|
|
Display the row and column in the periodic table of the given atomic number.
|
|
|
|
;The periodic table:
|
|
Let us consider the following periodic table representation.
|
|
|
|
<pre>
|
|
__________________________________________________________________________
|
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
|
| |
|
|
|1 H He |
|
|
| |
|
|
|2 Li Be B C N O F Ne |
|
|
| |
|
|
|3 Na Mg Al Si P S Cl Ar |
|
|
| |
|
|
|4 K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr |
|
|
| |
|
|
|5 Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe |
|
|
| |
|
|
|6 Cs Ba * Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn |
|
|
| |
|
|
|7 Fr Ra ° Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og |
|
|
|__________________________________________________________________________|
|
|
| |
|
|
| |
|
|
|8 Lantanoidi* La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu |
|
|
| |
|
|
|9 Aktinoidi° Ak Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr |
|
|
|__________________________________________________________________________|
|
|
</pre>
|
|
|
|
;Example test cases;
|
|
|
|
* <code>1</code> -> <code>1 1</code>
|
|
* <code>2</code> -> <code>1 18</code>
|
|
* <code>29</code> -> <code>4 11</code>
|
|
* <code>42</code> -> <code>5 6</code>
|
|
* <code>57</code> -> <code>8 4</code>
|
|
* <code>58</code> -> <code>8 5</code>
|
|
* <code>72</code> -> <code>6 4</code>
|
|
* <code>89</code> -> <code>9 4</code>
|
|
|
|
;Details;
|
|
|
|
The representation of the periodic table may be represented in various way. The one presented in this challenge does have the following property : Lantanides and Aktinoides are all in a dedicated row, hence there is no element that is placed at 6, 3 nor 7, 3.
|
|
|
|
You may take a look at the atomic number repartitions [https://en.wikipedia.org/wiki/Periodic_table#/media/File:Simple_Periodic_Table_Chart-blocks.svg here].
|
|
|
|
The atomic number is at least 1, at most 118.
|
|
|
|
|
|
;See also:
|
|
* [https://en.wikipedia.org/wiki/Periodic_table the periodic table]
|
|
* [https://twitter.com/CompSciFact/status/1537447575573233666 This task was an idea from CompSciFact]
|
|
* [https://ascii.periodni.com/index.html The periodic table in ascii] that was used as template
|
|
<br><br>
|
|
|