[14681번 - java] 사분면 고르기

[14681번 - java] 사분면 고르기

https://www.acmicpc.net/problem/14681

내 답안

import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Scanner s = new Scanner(System.in); int a = s.nextInt(); int b = s.nextInt(); if (a>0 && b>0) { System.out.println("1"); } else if (a>0 && b<0) { System.out.println("4"); } else if (a<0 && b>0) { System.out.println("2"); } else System.out.println("3"); } }

from http://dotddori-prgmwh.tistory.com/49 by ccl(A) rewrite - 2021-11-03 15:01:46