본문 바로가기

컴퓨터58

[SWEA] 10570. 제곱 팰린드롬 수 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AXO72aaqPrcDFAXS SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include typedef long long ll; using namespace std; int check_pal(int num)//맞으면 1, 아니면 0리턴 { if( num / 10 == 0) return 1; else if(num / 10 < 10) { if(num % 10 == num / 10) return 1; }else{ if(num / 100 == num % 10) .. 2021. 2. 16.
[SWEA] 11387. 몬스터 사냥 (float대신 double을 써야하는 이유) https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXb6LR76vCcDFARR&categoryId=AXb6LR76vCcDFARR&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com =====속도가 느린버전======= #include int main(void) { int size; double sum,.. 2021. 2. 15.
[BOJ] 2839. 설탕배달 #include #include #include #define MAX 10000001 typedef long long ll; using namespace std; int main(void) { int num; int sum = 0; int cnt; scanf("%d",&num); cnt = num / 5; if(num % 5 != 0) { for(int i = cnt; i >= cnt; i--)//500원을 많이 쓸 수록 좋음 { if( (num-5*i) % 3 == 0) { sum += i + (num- 5*i) / 3; break; } } }else{ printf("%d\n",num/5); return 0; } /* if(sum) printf("%d\n",sum); else printf("-1\n").. 2021. 2. 10.
[SWEA] 10761. 신뢰(로봇 버튼누르기) https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AXSVc1TqEAYDFAQT SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include #include typedef long long ll; using namespace std; //가장 바깥에 꽂힌경우 0점인것만 처리. int main(void) { int tc,num; char alpha; int bt; int b; int o; int global; int og,bg; scanf("%d",&tc); .. 2021. 2. 9.
[SWEA] 10965. 제곱수 만들기 (에라토스테네스의 체) 빠른속도 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXWXH_h695kDFAST&categoryId=AXWXH_h695kDFAST&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include #include #define MAX 10.. 2021. 2. 6.
[SWEA] 11285. 다트 게임 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXZuaLsqz9wDFAST&categoryId=AXZuaLsqz9wDFAST&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include #include typedef long l.. 2021. 2. 5.
[SWEA] 11315. 오목 판정 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXaSUPYqPYMDFASQ&categoryId=AXaSUPYqPYMDFASQ&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include typedef long long ll; u.. 2021. 2. 4.
[SWEA] 1859. 백만 장자 프로젝트 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5LrsUaDxcDFAXc SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include typedef long long ll; using namespace std; int main(void) { int size; int len; vector v; ll quan,buy,sell,num; int max,index; scanf("%d",&size); for(int i = 0; i < size; i++) { ma.. 2021. 2. 3.
[SWEA] 1954. 달팽이 숫자 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PobmqAPoDFAUq&categoryId=AV5PobmqAPoDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include typedef long long ll; using name.. 2021. 2. 2.
[SWEA] 1288. 새로운 불면증 치료법(비트마스크) https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV18_yw6I9MCFAZN SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include typedef long long ll; using namespace std; int main(void) { // 0 ~9 까지니까 1023이면 될듯. int size,n; int result,temp,digit; int mul; scanf("%d",&size); for(int i = 0; i < size; i++) { .. 2021. 2. 1.
728x90