https://www.acmicpc.net/problem/27866 27866번: 문자와 문자열 첫째 줄에 영어 소문자와 대문자로만 이루어진 단어 $S$가 주어진다. 단어의 길이는 최대 $1\,000$이다. 둘째 줄에 정수 $i$가 주어진다. ($1 \le i \le \left|S\right|$) www.acmicpc.net S = input() i = int(input()) print(S[i - 1])
https://www.acmicpc.net/problem/25314 25314번: 코딩은 체육과목 입니다 오늘은 혜아의 면접 날이다. 면접 준비를 열심히 해서 앞선 질문들을 잘 대답한 혜아는 이제 마지막으로 칠판에 직접 코딩하는 문제를 받았다. 혜아가 받은 문제는 두 수를 더하는 문제였다. C++ www.acmicpc.net N = int(input()) for i in range(N // 4): print("long", end=" ") print("int")
https://www.acmicpc.net/problem/10250 10250번: ACM 호텔 프로그램은 표준 입력에서 입력 데이터를 받는다. 프로그램의 입력은 T 개의 테스트 데이터로 이루어져 있는데 T 는 입력의 맨 첫 줄에 주어진다. 각 테스트 데이터는 한 행으로서 H, W, N, 세 정수 www.acmicpc.net import math case_cnt = int(input()) for i in range(case_cnt): H, W, N = input().split() if N == H: floor = H room = 1 else: floor = int(N) % int(H) if floor == 0: floor = H room = math.ceil(int(N) / int(H)) print(f"{..
https://www.acmicpc.net/problem/25304 25304번: 영수증 준원이는 저번 주에 살면서 처음으로 코스트코를 가 봤다. 정말 멋졌다. 그런데, 몇 개 담지도 않았는데 수상하게 높은 금액이 나오는 것이다! 준원이는 영수증을 보면서 정확하게 계산된 것 www.acmicpc.net total_calc = 0 total = int(input()) goods_count = int(input()) for i in range(goods_count): p, c = input().split() total_calc += int(p) * int(c) if total == total_calc: print("Yes") else: print("No")

오후에 걸어놨던 다운로드가 새벽에 깨서 보니까 5프로인거 보고 뭔가 싶었다 qt 다운로더가 미러를 제대로 잡지를 못함 미러 사이트 리스트는 아래 있음 https://download.qt.io/static/mirrorlist/ Qt Downloads download.qt.io 가까운게 일본, 중국 두 개임 들어가서 http 눌러서 타고타고 들어가서 테스트로 하나씩 받아보니 얘가 가장 빨라서(초당 "qt 인스톨러파일 경로 --mirror https://~~~ 주면 됨 아래는 예시 C:\Windows\System32>C:\Users\jmlee\Downloads\qt-unified-windows-x64-4.6.0-online.exe --mirror https://mirrors.ustc.edu.cn/qtproje..

테스트로 함수 내부에서 선언, 초기화하면 파일로 잘 찍히는데 전역으로 두고 하니까 파일에 안찍혀서 돌아버릴뻔했음 이거 관련해서 찾다가 issue에 flush 관련 언급이 있어서 추가함 - flush 자주하면 성능에 영향이 있나 봄 - spdlog::flush_on(spdlog::level::trace) https://github.com/gabime/spdlog/issues/82 file loggers don't produce any output in the file · Issue #82 · gabime/spdlog I've tried to create a file logger by using this line: auto MainDebug = spdlog::rotating_logger_mt("file_lo..
zip과 tar 둘 다 한 라이브러리로 처리 하려고 하는데 sharpziplib-standard에서 Zip시에 한글 깨져서 아래 추가, 아래 추가 안해도 반디집으로 열어서 코드페이지 utf-8로 바꾸면 나옴 ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 949; 근데 Tar의 경우 한글로 시작하면 entry에 들어가지도 않고, 한글이 중간에 있으면 들어가긴 하는데 깨짐, 코드페이지 바꿔봐도 차이 없음 zip에서는 위 처럼 codepage를 제공하는데 Tar는 딱히 없어서 SharpCompress 라이브러리 테스트 중 SharpCompress Tar Archive, Exclude specific file extension [TestMethod("S..

top_consume_amount = int(0) top_consume_university = "" t = int(input()) for a in range(t): n = int(input()) for b in range(n): university, consume = input().split(' ') if(int(consume) > int(top_consume_amount)): top_consume_university, top_consume_amount = university, consume print(top_consume_university) https://www.acmicpc.net/problem/11557 11557번: Yangjojang of The Year 입학 OT때 누구보다도 남다르게 놀았던..

이제서야 dp가 뭔지 왜 쓰는지 언제 쓰는지 쳐다보고 있다... #include #include int fibo(int dp[], int n) { if (dp[n] != -1) { return dp[n]; } if (n == 0) { dp[n] = n; } else if (n == 1) { dp[n] = 1; } else { dp[n] = fibo(dp, n - 1) + fibo(dp, n - 2); } return dp[n]; } int main() { //2748의 경우 N이 90까지라 dp[91] //그리고 90일 경우 value가 크기 때문에 //long long dp[91], long long fibo로 int N = 0, dp[46]; scanf("%d", &N); for (int i = 0; i

#include #include int main() { int hour = 0, minute = 0; int new_minute = 60; scanf("%d %d", &hour, &minute); if(minute - 45 < 0) { new_minute = new_minute + (minute - 45); if(hour == 0) hour = 23; else hour--; printf("%d %d", hour, new_minute); } else { printf("%d %d", hour, minute - 45); } } https://www.acmicpc.net/problem/2884 2884번: 알람 시계 상근이는 매일 아침 알람을 듣고 일어난다. 알람을 듣고 바로 일어나면 다행이겠지만, 항상 조금만..
Contact: j0n9m1n1@gmail.com