백준 온라인 저지 / 15080번 Every Second Counts https://www.acmicpc.net/problem/15080 15080번: Every Second Counts Input consists of two lines: the first contains the start time and the second contains the end time for a single taxi ride. Each time is of the form hh : mm : ss, giving the hour, minute and seconds. Meredith uses a 24 hour clock, with 0 : 0 : 0 representi www.acmicpc.net 사용언어 : C (C99) 알고리즘 ..
백준 온라인 저지 / 15059번 Hard choice https://www.acmicpc.net/problem/15059 15059번: Hard choice The first line contains three integers Ca, Ba and Pa (0 ≤ Ca, Ba, Pa ≤ 100), representing respectively the number of meals available for chicken, beef and pasta. The second line contains three integers Cr, Br and Pr (0 ≤ Cr, Br, Pr ≤ 100), indicati www.acmicpc.net 사용언어 : C (C99) 알고리즘 : 수학, 구현 C 코드 1. 문제 정리 장..
프로그래밍 준비 1. 라이브러리 함수란? 예 6개를 들고 용도를 설명해보시오 A. 함수는 총 라이브러리 함수와 사용자 정의 함수 두 가지가 있는데, 라이브러리 함수는 사용자가 직접 정의한 것이 아닌, 이미 개발 툴에서 제공되는 표준 함수이다. 수학적 연산, 입출력, 메모리 할당 등등 다양한 작업을 위한 또 다른 함수들을 제공하는 함수이다. C 라이브러리 함수의 예 (stdio.h) fputs gets printf scanf fwrite fopen 2. 함수를 호출하는 방법 (함수를 사용하는 방법) 두 가지 예를 들어 간단히 설명하시오 A. int a; double f; 1번째 함수는 int형 변수 a를 선언하는 방법이고, double f는 double형 변수 f를 선언하는 방법이다. ex) 자료형 변수명..
백준 온라인 저지 / 15680번 연세대학교 https://www.acmicpc.net/problem/15680 15680번: 연세대학교 연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다. 이를 출력하는 프로그램을 작성해보도록 하자. www.acmicpc.net 사용언어 : C (C99) 알고리즘 : 수학, 사칙연산 C 코드 1. 문제 정리 입력 값을 받아 0이면 연세대학교를 1이면 슬로건을 입력하는 문제이다. 간단하게 삼항연산자로 해결 했다. 2. 완성 코드 #include int main(void) { int a; scanf("%d", &a); printf(a==1? "Leading the Way to the Future" : "YONSEI" ); }
1. 정답 코드 #include int main(void) { printf("%d %d",-2147483648,2147483647); } 2. 코드 설명 32비트 int의 범위를 출력하면 되는 간단한 문제이다. int는 -2147483648 ~ 2147483647까지 이다.