[TIL] 2021.08.27
1. 알고리즘
https://www.acmicpc.net/problem/14888
def go(deep, now):
    global max_num, min_num
    if deep == N:
        if now > max_num:
            max_num = now
        if now < min_num:
            min_num = now
        return
    for i in range(4):
        if calcs[i] > 0:
            calcs[i] -= 1
            if i == 0:
                go(deep+1, now + numbers[deep])
            elif i == 1:
                go(deep+1, now - numbers[deep])
            elif i == 2:
                go(deep+1, now * numbers[deep])
            else:
                if now < 0:
                    res = abs(now) //numbers[deep]
                    go(deep+1, -res)
                else:
                    go(deep+1, now // numbers[deep])
            calcs[i] += 1
N = int(input())
numbers = list(map(int, input().split()))
calcs = list(map(int, input().split()))
max_num = -9999999999999999999
min_num = 999999999999999999
go(1,numbers[0])
print(max_num)
print(min_num)2. CS50
casting
#include <stdio.h>
#include <cs50.h>
int main(void){
    int x = get_int("x :");
    int y = get_int("y :");
    // casting
    float z = (float) x/ (float) y
    printf("%f\n", z);
}Author And Source
이 문제에 관하여([TIL] 2021.08.27), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@minjae2271/TIL-2021.08.27저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)