https://school.programmers.co.kr/learn/courses/30/lessons/340206
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
C++
#include <iostream>
using namespace std;
int main(void) {
int angle1;
int angle2;
cin >> angle1 >> angle2;
int sum_angle = angle1 + angle2;
cout << sum_angle%360 << endl;
return 0;
}
자바
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int angle1 = sc.nextInt();
int angle2 = sc.nextInt();
int sum_angle = angle1 + angle2;
System.out.println(sum_angle%360);
}
}
파이썬
angle1 = int(input())
angle2 = int(input())
sum_angle = angle1 + angle2
print(sum_angle%360)
'Portpolio > codingtest' 카테고리의 다른 글
프로그래머스 커피 심부름 풀이 (0) | 2025.02.26 |
---|---|
프로그래머스 수 나누기 풀이 (0) | 2025.02.26 |
프로그래머스 문자 출력 풀이 (0) | 2025.02.26 |
프로그래머스 문자열을 정수로 변환하기 풀이 (1) | 2025.02.23 |
python 내장 함수 (0) | 2025.02.23 |
댓글