junior Problem J Quadrant Selection Time limit second Problem Description A common problem in mathematics is to determine which quadrant a given point lies in There are four quadrants numbered from to as shown in the diagram below y Quadrant Quadrant B -
Problem J Quadrant Selection Time limit second Problem Description A common problem in mathematics is to determine which quadrant a given point lies in There are four quadrants numbered from to as shown in the diagram below y Quadrant Quadrant B - C - - A x D - Quadrant Quadrant For example the point A which is at coordinates lies in quadrant since both its x and y values are positive and point B lies in quadrant since its x value is negative and its y value is positive Your job is to take a point and determine the quadrant it is in You can assume that neither of the two coordinates will be Input Speci ?cation The ?rst line of input contains the integer x ?? ? x ? x The second line of input contains the integer y ?? ? y ? y Output Speci ?cation Output the quadrant number or for the point x y Sample Input Output for Sample Input Sample Input - Output for Sample Input Version franc aise sont apre s la version anglaise CProble me J De ?termination du quadrant Description du proble me En mathe ?matiques il faut souvent de ?terminer dans quel quadrant un point est situe ? Il y a quatre quadrants appele ?s er e e et e quadrants comme dans la ?gure suivante y e quadrant er quadrant B - C - - e quadrant A x D - e quadrant Par exemple le point A qui a pour coordonne ?es est situe ? dans le er quadrant puisque ses coordonne ?es les valeurs de x et de y sont toutes deux strictement positives tandis que le point B est situe ? dans le e quadrant puisque son abscisse la valeur de x est strictement ne ?gative et son ordonne ?e la valeur de y est strictement positive Apartir des coordonne ?es d ? un point donne ? vous devez de ?terminer dans quel quadrant le point est situe ? Vous pouvez supposer qu ? aucune des deux coordonne ?es ne sera e ?gale a Pre ?cisions par rapport aux entre ?es La premiere ligne d ? entre ?e contiendra un entier x ?? ? x ? x La deuxieme ligne d ? entre ?e contiendra un entier y ?? ? y ? y Pre ?cisions par rapport aux sorties La sortie sera le nume ?ro ou du quadrant dans lequel le point x y est situe ? Exemple d ? entre ?e Sortie pour l ? exemple d ? entre ?e Exemple d ? entre ?e - Sortie pour l ? exemple d ? entre ?e English version appears before the French version CProblem J Shifty Sum Time limit second Problem Description Suppose we have a number like Let ? s de ?ne shifting a number to mean adding a zero at the end For example if we shift that number once we get the number If we shift the number again we get the number
Documents similaires
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702547231chgejnyifcaqrve3bwrxxkhjbese9rc0jmdi1coxa26p5cip0f57k8raehx8ngurgjw6dfdki2bfk189it4fnlp6l629dwhpf7ja.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702110239tkowb5kqnapqgene3gytwbmw97x46l3960sutg3y9fh3bsjrfyk0ldrunripjlgtrfhsiovxhefbpbdpslugqlsm5thwklp6cmjc.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702081113rjnlrzr5vqfnqwstrstct4ld2hpadbyhutzudkkcc83ef2cs9aoru2aluzwqeuifhz2df2cezigh0hidegafiuv1ds4jm1ozl4ek.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702430783mb9qdxgc7gruhjqx2allt4nid7q8zqkl5avxdkmbyt2iyi5z6bcodjxsk1k4ri3hdjdh3vichswqza3myzq3walrqhpjvudjjdtg.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702211971glmwmvs7xmpysxktw1jqxmmloyi7qx1of5nzqfoxjncthkidzwpodssaho7qrfyjdjglhnvvrw7i2nzqy13d1osugyuejvqji01u.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702552304whpkleplorx91ybws9sr7dh69d1vltlcmashyvhfzd7jui8tfp0bxaksccsdiexdem4jbic45lzz3hjsltoodnryhtcbiwzbup9c.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/117022130072blpt4azsjj7wwbiud4zhjpvycnrjsr0emftqxalvp2xzlazwsudyje3mwzkzzm91sifusdznc7utsnonk5ciukv74yw3mxdi8yo.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/DpeqEPL47ZT3Dwxq9vtIGLHPoGJp6QwzJniMf2haPaqgVRfkNeQS28b5hHBtTv1O25YZNscxWKPxVc0VbbtsHSaH.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702692731caza6srd5sjv247hm5wep4rqlm2k0vvobnbqj5hynncezgdjq1n2c37qvrdpkvl0ehdawbspht7knebp7czh5xzdzslmwtusrizr.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11702384902uh2nbyp3i52u3dywyb8bii2a1ott23zs4s7op5anwpwjj9zmceoqkizxikbkixo3q5imfru5jluuhfq0nix3xwnyfbuafwoycg2b.png)
-
29
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise- Détails
- Publié le Mai 10, 2022
- Catégorie Industry / Industr...
- Langue French
- Taille du fichier 60.3kB