Baekjoon12 백준(Baekjoon) 1541 C++ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 #include #include using namespace std; /* ex) (50 + 30 + 10) - (6 + 4 + 35 + 13) - (35 + 1 + 0 + 2) - (15 + 57) 알고리즘 : '-'문자 이후의 모든 숫자들을 빼면 된다. 연산자의 다음부터 0이 아닌 숫자 이전에 0이 .. 2020. 2. 27. 백준(Baekjoon) 1120 C++ 12345678910111213141516171819202122232425262728293031323334353637#include #include #include using namespace std; string A, B; int result = 50; // A와 B의 차이 최소값 void solve(){ for(int i = 0; i B;} int main(void){ ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); input(); solve(); return 0;}Colored by Color Scriptercs 2020. 2. 26. 백준(Baekjoon) 2875 C++ 2020. 2. 24. 백준(Baekjoon) 2217 C++ 2020. 2. 24. 이전 1 2 3 다음