송용우

Merge commit 'ccd63467' into develop

...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 ## API Table 19 ## API Table
20 20
21 | group | description | method | URL | Detail | Auth | 21 | group | description | method | URL | Detail | Auth |
22 -| ------- | --------------------------- | --------- | ----------------------- | -------- | --------- | 22 +| ------- | --------------------------------- | ------ | ----------------------- | -------- | --------- |
23 | user | 유저 등록 | POST | api/user | 바로가기 | JWT Token | 23 | user | 유저 등록 | POST | api/user | 바로가기 | JWT Token |
24 | user | 유저 삭제 | DELETE | api/user:id | 바로가기 | JWT Token | 24 | user | 유저 삭제 | DELETE | api/user:id | 바로가기 | JWT Token |
25 | user | 특정 유저 조회 | GET | api/user:id | 바로가기 | None | 25 | user | 특정 유저 조회 | GET | api/user:id | 바로가기 | None |
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
31 | profile | 유저 정보 수정 | POST | api/profile/setprofile | 바로가기 | JWT TOKEN | 31 | profile | 유저 정보 수정 | POST | api/profile/setprofile | 바로가기 | JWT TOKEN |
32 | profile | 유저 정보 받아오기 | POST | api/profile/getprofile | 바로가기 | JWT | 32 | profile | 유저 정보 받아오기 | POST | api/profile/getprofile | 바로가기 | JWT |
33 | profile | 추천 문제 조회 | POST | api/profile/recommend | 바로가기 | None | 33 | profile | 추천 문제 조회 | POST | api/profile/recommend | 바로가기 | None |
34 -| notify | 슬랙 메시지 전송 요청 | POST | api/notify/ | 34 +| notify | 슬랙 메시지 전송 요청 (성취여부) | POST | api/notify/goal | 바로가기 | Jwt Token |
35 -| slack | 바로가기 | Jwt Token | 35 +| notify | 슬랙 메시지 전송 요청 (문제 추천) | POST | api/notify/recommend | 바로가기 | None |
36 | auth | 로그인 | POST | api/auth/login | 바로가기 | None | 36 | auth | 로그인 | POST | api/auth/login | 바로가기 | None |
37 | auth | 로그아웃 | POST | api/auth/logout | 바로가기 | JWT Token | 37 | auth | 로그아웃 | POST | api/auth/logout | 바로가기 | JWT Token |
38 | auth | 회원가입 | POST | api/auth/register | 바로가기 | None | 38 | auth | 회원가입 | POST | api/auth/register | 바로가기 | None |
......
...@@ -1341,3 +1341,44 @@ ...@@ -1341,3 +1341,44 @@
1341 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "GET /api/auth/check HTTP/1.1" 200 55 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54" 1341 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "GET /api/auth/check HTTP/1.1" 200 55 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54"
1342 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "POST /api/profile/getprofile HTTP/1.1" 401 12 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54" 1342 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "POST /api/profile/getprofile HTTP/1.1" 401 12 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54"
1343 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "POST /api/profile/getprofile HTTP/1.1" 200 33293 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54" 1343 ::ffff:127.0.0.1 - - [24/Jun/2020:15:41:51 +0000] "POST /api/profile/getprofile HTTP/1.1" 200 33293 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54"
1344 +::1 - - [24/Jun/2020:16:47:20 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1345 +::1 - - [24/Jun/2020:16:47:43 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1346 +::1 - - [24/Jun/2020:16:48:07 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1347 +::1 - - [24/Jun/2020:16:49:04 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1348 +::1 - - [24/Jun/2020:16:50:59 +0000] "POST /api/notify/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1349 +::1 - - [24/Jun/2020:16:52:40 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1350 +::ffff:127.0.0.1 - - [24/Jun/2020:16:52:55 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1351 +::1 - - [24/Jun/2020:16:54:01 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1352 +::1 - - [24/Jun/2020:16:54:14 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1353 +::1 - - [24/Jun/2020:16:54:28 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1354 +::1 - - [24/Jun/2020:16:56:14 +0000] "POST /api/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1355 +::1 - - [24/Jun/2020:16:56:33 +0000] "POST /api/profile/getprofile HTTP/1.1" 200 33293 "-" "PostmanRuntime/7.25.0"
1356 +::1 - - [24/Jun/2020:16:56:52 +0000] "POST /api/notify/slack/goal HTTP/1.1" 500 21 "-" "PostmanRuntime/7.25.0"
1357 +::1 - - [24/Jun/2020:16:57:18 +0000] "POST /api/notify/slack/goal HTTP/1.1" 500 21 "-" "PostmanRuntime/7.25.0"
1358 +::1 - - [24/Jun/2020:16:57:50 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1359 +::1 - - [24/Jun/2020:17:00:04 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1360 +::ffff:127.0.0.1 - - [24/Jun/2020:17:00:27 +0000] "POST /api/profile/getprofile HTTP/1.1" 200 33293 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54"
1361 +::ffff:127.0.0.1 - - [24/Jun/2020:17:00:29 +0000] "POST /api/profile/setprofile HTTP/1.1" 200 33293 "http://localhost:3000/setting" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 Edg/83.0.478.54"
1362 +::1 - - [24/Jun/2020:17:00:37 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1363 +::1 - - [24/Jun/2020:17:01:46 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1364 +::ffff:127.0.0.1 - - [24/Jun/2020:17:12:37 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1365 +::1 - - [24/Jun/2020:17:13:17 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1366 +::1 - - [24/Jun/2020:17:13:36 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1367 +::1 - - [24/Jun/2020:17:14:19 +0000] "POST /api/notify/slack/goal HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1368 +::1 - - [24/Jun/2020:17:22:37 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1369 +::1 - - [24/Jun/2020:17:23:06 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1370 +::1 - - [24/Jun/2020:17:27:52 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1371 +::1 - - [24/Jun/2020:17:30:55 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1372 +::1 - - [24/Jun/2020:17:32:42 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1373 +::1 - - [24/Jun/2020:17:34:03 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1374 +::1 - - [24/Jun/2020:17:36:50 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1375 +::1 - - [24/Jun/2020:17:40:43 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 500 21 "-" "PostmanRuntime/7.25.0"
1376 +::1 - - [24/Jun/2020:17:42:09 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1377 +::1 - - [24/Jun/2020:17:43:17 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1378 +::1 - - [24/Jun/2020:17:53:11 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1379 +::1 - - [24/Jun/2020:17:53:24 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1380 +::1 - - [24/Jun/2020:17:54:40 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1381 +::1 - - [24/Jun/2020:17:55:11 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1382 +::1 - - [24/Jun/2020:17:55:24 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1383 +::1 - - [24/Jun/2020:17:55:39 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 404 9 "-" "PostmanRuntime/7.25.0"
1384 +::1 - - [24/Jun/2020:18:00:32 +0000] "POST /api/notify/slack/recommend HTTP/1.1" 500 21 "-" "PostmanRuntime/7.25.0"
......
...@@ -3,7 +3,7 @@ const api = new Router(); ...@@ -3,7 +3,7 @@ const api = new Router();
3 3
4 const auth = require("./auth"); 4 const auth = require("./auth");
5 const friend = require("./friend"); 5 const friend = require("./friend");
6 -const notify = require("./profile"); 6 +const notify = require("./notify");
7 const user = require("./user"); 7 const user = require("./user");
8 const profile = require("./profile"); 8 const profile = require("./profile");
9 9
......
1 const Router = require("koa-router"); 1 const Router = require("koa-router");
2 const notify = new Router(); 2 const notify = new Router();
3 - 3 +const slackCtrl = require("./slack.ctrl");
4 -notify.post("/slack"); 4 +notify.post("/slack/goal", slackCtrl.slackGoal);
5 +notify.post("/slack/recommend", slackCtrl.slackRecommend);
5 6
6 module.exports = notify; 7 module.exports = notify;
......
1 +const Profile = require("../../models/profile");
2 +const sendSlack = require("../../util/sendSlack");
3 +const problem_set = require("../../data/problem_set");
4 +const compareBJ = require("../../util/compareBJ");
5 +/*
6 +POST api/notify/slack/goal
7 +{
8 + username: "username"
9 +}
10 +*/
11 +exports.slackGoal = async (ctx) => {
12 + try {
13 + const { username } = ctx.request.body;
14 +
15 + const profile = await Profile.findByUsername(username);
16 + if (!profile) {
17 + ctx.status = 401;
18 + return;
19 + }
20 + let slackURL = profile.getslackURL();
21 + if (!slackURL) {
22 + ctx.status = 401;
23 + return;
24 + }
25 + let goalNum = profile.getgoalNum();
26 + let todayNum = profile.getTodaySovled();
27 + let message = "";
28 + if (goalNum < todayNum) {
29 + message =
30 + "오늘의 목표 " +
31 + goalNum +
32 + "문제 중 " +
33 + todayNum +
34 + "문제를 풀었습니다." +
35 + "\n" +
36 + "잘하셨습니다!";
37 + } else {
38 + message =
39 + "오늘의 목표 " +
40 + goalNum +
41 + "문제 중 " +
42 + todayNum +
43 + "문제를 풀었습니다." +
44 + "\n" +
45 + "분발하세요!";
46 + }
47 +
48 + sendSlack.send(message, slackURL);
49 + } catch (e) {
50 + ctx.throw(500, e);
51 + }
52 +};
53 +
54 +/*
55 +POST api/notify/slack/recommend
56 +{
57 + username: "username"
58 +}
59 +*/
60 +exports.slackRecommend = async (ctx) => {
61 + try {
62 + console.log("1");
63 + const { username } = ctx.request.body;
64 +
65 + const profile = await Profile.findByUsername(username);
66 + if (!profile) {
67 + ctx.status = 401;
68 + return;
69 + }
70 + let slackURL = profile.getslackURL();
71 + if (!slackURL) {
72 + ctx.status = 401;
73 + return;
74 + }
75 + let unsolved_data = compareBJ.compareBJ(
76 + profile.getBJdata(),
77 + problem_set.problem_set
78 + );
79 + let recommendData = compareBJ.randomItem(unsolved_data);
80 +
81 + if (!recommendData) {
82 + ctx.status = 401;
83 + return;
84 + }
85 + let message =
86 + "오늘의 추천 문제는 " +
87 + recommendData.problem_number +
88 + "번 " +
89 + " <https://www.boj.kr/" +
90 + recommendData.problem_number +
91 + "|" +
92 + recommendData.problem_title +
93 + ">" +
94 + " 입니다.";
95 + sendSlack.send(message, slackURL);
96 + } catch (e) {
97 + ctx.throw(500, e);
98 + }
99 +};
1 exports.problem_set = [ 1 exports.problem_set = [
2 - "1517", 2 + {
3 - "2448", 3 + problem_number: "1517",
4 - "1891", 4 + problem_title: "버블 소트",
5 - "1074", 5 + solved_date: "20200621",
6 - "2263", 6 + },
7 - "1780", 7 + {
8 - "11728", 8 + problem_number: "2448",
9 - "10816", 9 + problem_title: "별 찍기 - 11",
10 - "10815", 10 + solved_date: "20200621",
11 - "2109", 11 + },
12 - "1202", 12 + { problem_number: "1891", problem_title: "사분면", solved_date: "20200621" },
13 - "1285", 13 + { problem_number: "1074", problem_title: "Z", solved_date: "20200620" },
14 - "2138", 14 + {
15 - "1080", 15 + problem_number: "2263",
16 - "11399", 16 + problem_title: "트리의 순회",
17 - "1931", 17 + solved_date: "20200620",
18 - "11047", 18 + },
19 - "15666", 19 + {
20 - "15665", 20 + problem_number: "1780",
21 - "15664", 21 + problem_title: "종이의 개수",
22 - "15663", 22 + solved_date: "20200619",
23 - "15657", 23 + },
24 - "15656", 24 + {
25 - "15655", 25 + problem_number: "11728",
26 - "15654", 26 + problem_title: "배열 합치기",
27 - "15652", 27 + solved_date: "20200619",
28 - "15651", 28 + },
29 - "15650", 29 + {
30 - "15649", 30 + problem_number: "10816",
31 - "6603", 31 + problem_title: "숫자 카드 2",
32 - "10971", 32 + solved_date: "20200619",
33 - "10819", 33 + },
34 - "10973", 34 + {
35 - "10974", 35 + problem_number: "10815",
36 - "10972", 36 + problem_title: "숫자 카드",
37 - "7576", 37 + solved_date: "20200619",
38 - "1248", 38 + },
39 - "2529", 39 + {
40 - "15661", 40 + problem_number: "2109",
41 - "14501", 41 + problem_title: "순회강연",
42 - "1759", 42 + solved_date: "20200619",
43 - "14391", 43 + },
44 - "14889", 44 + {
45 - "1182", 45 + problem_number: "1202",
46 - "11723", 46 + problem_title: "보석 도둑",
47 - "1748", 47 + solved_date: "20200619",
48 - "6064", 48 + },
49 - "1107", 49 + {
50 - "3085", 50 + problem_number: "1285",
51 - "2309", 51 + problem_title: "동전 뒤집기",
52 - "1748", 52 + solved_date: "20200617",
53 - "14500", 53 + },
54 - "1107", 54 + {
55 - "1476", 55 + problem_number: "2138",
56 - "3085", 56 + problem_title: "전구와 스위치",
57 - "2309", 57 + solved_date: "20200617",
58 - "1261", 58 + },
59 - "13549", 59 + { problem_number: "1080", problem_title: "행렬", solved_date: "20200617" },
60 - "14226", 60 + { problem_number: "11399", problem_title: "ATM", solved_date: "20200616" },
61 - "13913", 61 + {
62 - "1697", 62 + problem_number: "1931",
63 - "1967", 63 + problem_title: "회의실배정",
64 - "1167", 64 + solved_date: "20200616",
65 - "11725", 65 + },
66 - "2250", 66 + { problem_number: "11047", problem_title: "동전 0", solved_date: "20200615" },
67 - "1991", 67 + {
68 - "7562", 68 + problem_number: "15666",
69 - "2178", 69 + problem_title: "N과 M (12)",
70 - "4963", 70 + solved_date: "20200614",
71 - "2667", 71 + },
72 - "1707", 72 + {
73 - "11724", 73 + problem_number: "15665",
74 - "1260", 74 + problem_title: "N과 M (11)",
75 - "13023", 75 + solved_date: "20200614",
76 - "11652", 76 + },
77 - "1377", 77 + {
78 - "11004", 78 + problem_number: "15664",
79 - "10825", 79 + problem_title: "N과 M (10)",
80 - "2751", 80 + solved_date: "20200614",
81 - "9461", 81 + },
82 - "1699", 82 + {
83 - "9095", 83 + problem_number: "15663",
84 - "2225", 84 + problem_title: "N과 M (9)",
85 - "2133", 85 + solved_date: "20200614",
86 - "11727", 86 + },
87 - "11726", 87 + {
88 - "1463", 88 + problem_number: "15657",
89 - "2748", 89 + problem_title: "N과 M (8)",
90 - "2747", 90 + solved_date: "20200614",
91 - "11656", 91 + },
92 - "10824", 92 + {
93 - "2743", 93 + problem_number: "15656",
94 - "10820", 94 + problem_title: "N과 M (7)",
95 - "10808", 95 + solved_date: "20200614",
96 - "11655", 96 + },
97 - "11720", 97 + {
98 - "1008", 98 + problem_number: "15655",
99 - "10951", 99 + problem_title: "N과 M (6)",
100 - "2557", 100 + solved_date: "20200614",
101 - "1021", 101 + },
102 - "1966", 102 + {
103 - "2164", 103 + problem_number: "15654",
104 - "10799", 104 + problem_title: "N과 M (5)",
105 - "17413", 105 + solved_date: "20200614",
106 - "10866", 106 + },
107 - "1158", 107 + {
108 - "10845", 108 + problem_number: "15652",
109 - "1406", 109 + problem_title: "N과 M (4)",
110 - "1874", 110 + solved_date: "20200614",
111 - "9012", 111 + },
112 - "9093", 112 + {
113 - "10828", 113 + problem_number: "15651",
114 - "11721", 114 + problem_title: "N과 M (3)",
115 - "11719", 115 + solved_date: "20200612",
116 - "11718", 116 + },
117 - "10953", 117 + {
118 - "2558", 118 + problem_number: "15650",
119 - "10814", 119 + problem_title: "N과 M (2)",
120 - "1181", 120 + solved_date: "20200612",
121 - "11651", 121 + },
122 - "11650", 122 + {
123 - "1427", 123 + problem_number: "15649",
124 - "2108", 124 + problem_title: "N과 M (1)",
125 - "10989", 125 + solved_date: "20200612",
126 - "2751", 126 + },
127 - "2750", 127 + { problem_number: "6603", problem_title: "로또", solved_date: "20200612" },
128 - "1436", 128 + {
129 - "1018", 129 + problem_number: "10971",
130 - "7568", 130 + problem_title: "외판원 순회 2",
131 - "2231", 131 + solved_date: "20200611",
132 - "2798", 132 + },
133 - "1002", 133 + {
134 - "3053", 134 + problem_number: "10819",
135 - "4153", 135 + problem_title: "차이를 최대로",
136 - "3009", 136 + solved_date: "20200611",
137 - "1085", 137 + },
138 - "9020", 138 + {
139 - "4948", 139 + problem_number: "10973",
140 - "1929", 140 + problem_title: "이전 순열",
141 - "2581", 141 + solved_date: "20200611",
142 - "1978", 142 + },
143 - "2292", 143 + {
144 - "6064", 144 + problem_number: "10974",
145 - "2775", 145 + problem_title: "모든 순열",
146 - "10250", 146 + solved_date: "20200611",
147 - "2869", 147 + },
148 - "1011", 148 + {
149 - "1193", 149 + problem_number: "10972",
150 - "2839", 150 + problem_title: "다음 순열",
151 - "1712", 151 + solved_date: "20200611",
152 - "1316", 152 + },
153 - "2941", 153 + { problem_number: "7576", problem_title: "토마토", solved_date: "20200608" },
154 - "5622", 154 + { problem_number: "1248", problem_title: "맞춰봐", solved_date: "20200312" },
155 - "2908", 155 + { problem_number: "2529", problem_title: "부등호", solved_date: "20200311" },
156 - "1152", 156 + {
157 - "1157", 157 + problem_number: "15661",
158 - "2675", 158 + problem_title: "링크와 스타트",
159 - "10809", 159 + solved_date: "20200311",
160 - "11720", 160 + },
161 - "11654", 161 + { problem_number: "14501", problem_title: "퇴사", solved_date: "20200311" },
162 - "11729", 162 + {
163 - "2447", 163 + problem_number: "1759",
164 - "3052", 164 + problem_title: "암호 만들기",
165 - "10818", 165 + solved_date: "20200310",
166 - "10872", 166 + },
167 - "10870", 167 + {
168 - "1065", 168 + problem_number: "14391",
169 - "4673", 169 + problem_title: "종이 조각",
170 - "15596", 170 + solved_date: "20200306",
171 - "4344", 171 + },
172 - "2920", 172 + {
173 - "8958", 173 + problem_number: "14889",
174 - "1546", 174 + problem_title: "스타트와 링크",
175 - "2577", 175 + solved_date: "20200305",
176 - "2562", 176 + },
177 - "1110", 177 + {
178 - "10951", 178 + problem_number: "1182",
179 - "10952", 179 + problem_title: "부분수열의 합",
180 - "10871", 180 + solved_date: "20200305",
181 - "2439", 181 + },
182 - "2438", 182 + { problem_number: "11723", problem_title: "집합", solved_date: "20200305" },
183 - "11022", 183 + {
184 - "11021", 184 + problem_number: "1748",
185 - "2742", 185 + problem_title: "수 이어 쓰기 1",
186 - "2741", 186 + solved_date: "20200305",
187 - "15552", 187 + },
188 - "8393", 188 + {
189 - "10950", 189 + problem_number: "6064",
190 - "2739", 190 + problem_title: "카잉 달력",
191 - "10817", 191 + solved_date: "20200305",
192 - "2884", 192 + },
193 - "2753", 193 + { problem_number: "1107", problem_title: "리모컨", solved_date: "20200305" },
194 - "9498", 194 + {
195 - "1330", 195 + problem_number: "3085",
196 - "2588", 196 + problem_title: "사탕 게임",
197 - "10430", 197 + solved_date: "20200305",
198 - "10869", 198 + },
199 - "1008", 199 + {
200 - "10998", 200 + problem_number: "2309",
201 - "7287", 201 + problem_title: "일곱 난쟁이",
202 - "10172", 202 + solved_date: "20200305",
203 - "10171", 203 + },
204 - "10718", 204 + {
205 - "1001", 205 + problem_number: "1748",
206 - "1000", 206 + problem_title: "수 이어 쓰기 1",
207 - "2557", 207 + solved_date: "20200228",
208 + },
209 + {
210 + problem_number: "14500",
211 + problem_title: "테트로미노",
212 + solved_date: "20200228",
213 + },
214 + { problem_number: "1107", problem_title: "리모컨", solved_date: "20200228" },
215 + {
216 + problem_number: "1476",
217 + problem_title: "날짜 계산",
218 + solved_date: "20200228",
219 + },
220 + {
221 + problem_number: "3085",
222 + problem_title: "사탕 게임",
223 + solved_date: "20200228",
224 + },
225 + {
226 + problem_number: "2309",
227 + problem_title: "일곱 난쟁이",
228 + solved_date: "20200228",
229 + },
230 + {
231 + problem_number: "1261",
232 + problem_title: "알고스팟",
233 + solved_date: "20200228",
234 + },
235 + {
236 + problem_number: "13549",
237 + problem_title: "숨바꼭질 3",
238 + solved_date: "20200227",
239 + },
240 + {
241 + problem_number: "14226",
242 + problem_title: "이모티콘",
243 + solved_date: "20200227",
244 + },
245 + {
246 + problem_number: "13913",
247 + problem_title: "숨바꼭질 4",
248 + solved_date: "20200227",
249 + },
250 + {
251 + problem_number: "1697",
252 + problem_title: "숨바꼭질",
253 + solved_date: "20200227",
254 + },
255 + {
256 + problem_number: "1967",
257 + problem_title: "트리의 지름",
258 + solved_date: "20200221",
259 + },
260 + {
261 + problem_number: "1167",
262 + problem_title: "트리의 지름",
263 + solved_date: "20200221",
264 + },
265 + {
266 + problem_number: "11725",
267 + problem_title: "트리의 부모 찾기",
268 + solved_date: "20200221",
269 + },
270 + {
271 + problem_number: "2250",
272 + problem_title: "트리의 높이와 너비",
273 + solved_date: "20200221",
274 + },
275 + {
276 + problem_number: "1991",
277 + problem_title: "트리 순회",
278 + solved_date: "20200221",
279 + },
280 + {
281 + problem_number: "7562",
282 + problem_title: "나이트의 이동",
283 + solved_date: "20200220",
284 + },
285 + {
286 + problem_number: "2178",
287 + problem_title: "미로 탐색",
288 + solved_date: "20200220",
289 + },
290 + {
291 + problem_number: "4963",
292 + problem_title: "섬의 개수",
293 + solved_date: "20200219",
294 + },
295 + {
296 + problem_number: "2667",
297 + problem_title: "단지번호붙이기",
298 + solved_date: "20200219",
299 + },
300 + {
301 + problem_number: "1707",
302 + problem_title: "이분 그래프",
303 + solved_date: "20200217",
304 + },
305 + {
306 + problem_number: "11724",
307 + problem_title: "연결 요소의 개수",
308 + solved_date: "20200214",
309 + },
310 + {
311 + problem_number: "1260",
312 + problem_title: "DFS와 BFS",
313 + solved_date: "20200214",
314 + },
315 + { problem_number: "13023", problem_title: "ABCDE", solved_date: "20200213" },
316 + { problem_number: "11652", problem_title: "카드", solved_date: "20200210" },
317 + {
318 + problem_number: "1377",
319 + problem_title: "버블 소트",
320 + solved_date: "20200210",
321 + },
322 + {
323 + problem_number: "11004",
324 + problem_title: "K번째 수",
325 + solved_date: "20200210",
326 + },
327 + { problem_number: "10825", problem_title: "국영수", solved_date: "20200210" },
328 + {
329 + problem_number: "2751",
330 + problem_title: "수 정렬하기 2",
331 + solved_date: "20200210",
332 + },
333 + {
334 + problem_number: "9461",
335 + problem_title: "파도반 수열",
336 + solved_date: "20200205",
337 + },
338 + {
339 + problem_number: "1699",
340 + problem_title: "제곱수의 합",
341 + solved_date: "20200205",
342 + },
343 + {
344 + problem_number: "9095",
345 + problem_title: "1, 2, 3 더하기",
346 + solved_date: "20200205",
347 + },
348 + { problem_number: "2225", problem_title: "합분해", solved_date: "20200205" },
349 + {
350 + problem_number: "2133",
351 + problem_title: "타일 채우기",
352 + solved_date: "20200204",
353 + },
354 + {
355 + problem_number: "11727",
356 + problem_title: "2×n 타일링 2",
357 + solved_date: "20200203",
358 + },
359 + {
360 + problem_number: "11726",
361 + problem_title: "2×n 타일링",
362 + solved_date: "20200203",
363 + },
364 + {
365 + problem_number: "1463",
366 + problem_title: "1로 만들기",
367 + solved_date: "20200203",
368 + },
369 + {
370 + problem_number: "2748",
371 + problem_title: "피보나치 수 2",
372 + solved_date: "20200203",
373 + },
374 + {
375 + problem_number: "2747",
376 + problem_title: "피보나치 수",
377 + solved_date: "20200203",
378 + },
379 + {
380 + problem_number: "11656",
381 + problem_title: "접미사 배열",
382 + solved_date: "20200203",
383 + },
384 + { problem_number: "10824", problem_title: "네 수", solved_date: "20200203" },
385 + {
386 + problem_number: "2743",
387 + problem_title: "단어 길이 재기",
388 + solved_date: "20200203",
389 + },
390 + {
391 + problem_number: "10820",
392 + problem_title: "문자열 분석",
393 + solved_date: "20200203",
394 + },
395 + {
396 + problem_number: "10808",
397 + problem_title: "알파벳 개수",
398 + solved_date: "20200203",
399 + },
400 + { problem_number: "11655", problem_title: "ROT13", solved_date: "20200203" },
401 + {
402 + problem_number: "11720",
403 + problem_title: "숫자의 합",
404 + solved_date: "20200131",
405 + },
406 + { problem_number: "1008", problem_title: "A/B", solved_date: "20200131" },
407 + {
408 + problem_number: "10951",
409 + problem_title: "A+B - 4",
410 + solved_date: "20200131",
411 + },
412 + {
413 + problem_number: "2557",
414 + problem_title: "Hello World",
415 + solved_date: "20200131",
416 + },
417 + {
418 + problem_number: "1021",
419 + problem_title: "회전하는 큐",
420 + solved_date: "20200131",
421 + },
422 + {
423 + problem_number: "1966",
424 + problem_title: "프린터 큐",
425 + solved_date: "20200131",
426 + },
427 + { problem_number: "2164", problem_title: "카드2", solved_date: "20200131" },
428 + {
429 + problem_number: "10799",
430 + problem_title: "쇠막대기",
431 + solved_date: "20200131",
432 + },
433 + {
434 + problem_number: "17413",
435 + problem_title: "단어 뒤집기 2",
436 + solved_date: "20200131",
437 + },
438 + { problem_number: "10866", problem_title: "덱", solved_date: "20200131" },
439 + {
440 + problem_number: "1158",
441 + problem_title: "요세푸스 문제",
442 + solved_date: "20200131",
443 + },
444 + { problem_number: "10845", problem_title: "큐", solved_date: "20200130" },
445 + { problem_number: "1406", problem_title: "에디터", solved_date: "20200130" },
446 + {
447 + problem_number: "1874",
448 + problem_title: "스택 수열",
449 + solved_date: "20200130",
450 + },
451 + { problem_number: "9012", problem_title: "괄호", solved_date: "20200130" },
452 + {
453 + problem_number: "9093",
454 + problem_title: "단어 뒤집기",
455 + solved_date: "20200130",
456 + },
457 + { problem_number: "10828", problem_title: "스택", solved_date: "20200129" },
458 + {
459 + problem_number: "11721",
460 + problem_title: "열 개씩 끊어 출력하기",
461 + solved_date: "20200126",
462 + },
463 + {
464 + problem_number: "11719",
465 + problem_title: "그대로 출력하기 2",
466 + solved_date: "20200126",
467 + },
468 + {
469 + problem_number: "11718",
470 + problem_title: "그대로 출력하기",
471 + solved_date: "20200126",
472 + },
473 + {
474 + problem_number: "10953",
475 + problem_title: "A+B - 6",
476 + solved_date: "20200126",
477 + },
478 + { problem_number: "2558", problem_title: "A+B - 2", solved_date: "20200126" },
479 + {
480 + problem_number: "10814",
481 + problem_title: "나이순 정렬",
482 + solved_date: "20200123",
483 + },
484 + {
485 + problem_number: "1181",
486 + problem_title: "단어 정렬",
487 + solved_date: "20200122",
488 + },
489 + {
490 + problem_number: "11651",
491 + problem_title: "좌표 정렬하기 2",
492 + solved_date: "20200122",
493 + },
494 + {
495 + problem_number: "11650",
496 + problem_title: "좌표 정렬하기",
497 + solved_date: "20200122",
498 + },
499 + {
500 + problem_number: "1427",
501 + problem_title: "소트인사이드",
502 + solved_date: "20190823",
503 + },
504 + { problem_number: "2108", problem_title: "통계학", solved_date: "20190823" },
505 + {
506 + problem_number: "10989",
507 + problem_title: "수 정렬하기 3",
508 + solved_date: "20190823",
509 + },
510 + {
511 + problem_number: "2751",
512 + problem_title: "수 정렬하기 2",
513 + solved_date: "20190814",
514 + },
515 + {
516 + problem_number: "2750",
517 + problem_title: "수 정렬하기",
518 + solved_date: "20190814",
519 + },
520 + {
521 + problem_number: "1436",
522 + problem_title: "영화감독 숌",
523 + solved_date: "20190814",
524 + },
525 + {
526 + problem_number: "1018",
527 + problem_title: "체스판 다시 칠하기",
528 + solved_date: "20190814",
529 + },
530 + { problem_number: "7568", problem_title: "덩치", solved_date: "20190814" },
531 + { problem_number: "2231", problem_title: "분해합", solved_date: "20190814" },
532 + { problem_number: "2798", problem_title: "블랙잭", solved_date: "20190814" },
533 + { problem_number: "1002", problem_title: "터렛", solved_date: "20190814" },
534 + {
535 + problem_number: "3053",
536 + problem_title: "택시 기하학",
537 + solved_date: "20190814",
538 + },
539 + {
540 + problem_number: "4153",
541 + problem_title: "직각삼각형",
542 + solved_date: "20190814",
543 + },
544 + {
545 + problem_number: "3009",
546 + problem_title: "네 번째 점",
547 + solved_date: "20190814",
548 + },
549 + {
550 + problem_number: "1085",
551 + problem_title: "직사각형에서 탈출",
552 + solved_date: "20190814",
553 + },
554 + {
555 + problem_number: "9020",
556 + problem_title: "골드바흐의 추측",
557 + solved_date: "20190814",
558 + },
559 + {
560 + problem_number: "4948",
561 + problem_title: "베르트랑 공준",
562 + solved_date: "20190814",
563 + },
564 + {
565 + problem_number: "1929",
566 + problem_title: "소수 구하기",
567 + solved_date: "20190814",
568 + },
569 + { problem_number: "2581", problem_title: "소수", solved_date: "20190811" },
570 + {
571 + problem_number: "1978",
572 + problem_title: "소수 찾기",
573 + solved_date: "20190811",
574 + },
575 + { problem_number: "2292", problem_title: "벌집", solved_date: "20190811" },
576 + {
577 + problem_number: "6064",
578 + problem_title: "카잉 달력",
579 + solved_date: "20190811",
580 + },
581 + {
582 + problem_number: "2775",
583 + problem_title: "부녀회장이 될테야",
584 + solved_date: "20190811",
585 + },
586 + {
587 + problem_number: "10250",
588 + problem_title: "ACM 호텔",
589 + solved_date: "20190811",
590 + },
591 + {
592 + problem_number: "2869",
593 + problem_title: "달팽이는 올라가고 싶다",
594 + solved_date: "20190811",
595 + },
596 + {
597 + problem_number: "1011",
598 + problem_title: "Fly me to the Alpha Centauri",
599 + solved_date: "20190811",
600 + },
601 + {
602 + problem_number: "1193",
603 + problem_title: "분수찾기",
604 + solved_date: "20190810",
605 + },
606 + {
607 + problem_number: "2839",
608 + problem_title: "설탕 배달",
609 + solved_date: "20190809",
610 + },
611 + {
612 + problem_number: "1712",
613 + problem_title: "손익분기점",
614 + solved_date: "20190809",
615 + },
616 + {
617 + problem_number: "1316",
618 + problem_title: "그룹 단어 체커",
619 + solved_date: "20190809",
620 + },
621 + {
622 + problem_number: "2941",
623 + problem_title: "크로아티아 알파벳",
624 + solved_date: "20190809",
625 + },
626 + { problem_number: "5622", problem_title: "다이얼", solved_date: "20190809" },
627 + { problem_number: "2908", problem_title: "상수", solved_date: "20190809" },
628 + {
629 + problem_number: "1152",
630 + problem_title: "단어의 개수",
631 + solved_date: "20190809",
632 + },
633 + {
634 + problem_number: "1157",
635 + problem_title: "단어 공부",
636 + solved_date: "20190809",
637 + },
638 + {
639 + problem_number: "2675",
640 + problem_title: "문자열 반복",
641 + solved_date: "20190809",
642 + },
643 + {
644 + problem_number: "10809",
645 + problem_title: "알파벳 찾기",
646 + solved_date: "20190809",
647 + },
648 + {
649 + problem_number: "11720",
650 + problem_title: "숫자의 합",
651 + solved_date: "20190809",
652 + },
653 + {
654 + problem_number: "11654",
655 + problem_title: "아스키 코드",
656 + solved_date: "20190809",
657 + },
658 + {
659 + problem_number: "11729",
660 + problem_title: "하노이 탑 이동 순서",
661 + solved_date: "20190809",
662 + },
663 + {
664 + problem_number: "2447",
665 + problem_title: "별 찍기 - 10",
666 + solved_date: "20190809",
667 + },
668 + { problem_number: "3052", problem_title: "나머지", solved_date: "20190807" },
669 + {
670 + problem_number: "10818",
671 + problem_title: "최소, 최대",
672 + solved_date: "20190807",
673 + },
674 + {
675 + problem_number: "10872",
676 + problem_title: "팩토리얼",
677 + solved_date: "20190628",
678 + },
679 + {
680 + problem_number: "10870",
681 + problem_title: "피보나치 수 5",
682 + solved_date: "20190628",
683 + },
684 + { problem_number: "1065", problem_title: "한수", solved_date: "20190628" },
685 + {
686 + problem_number: "4673",
687 + problem_title: "셀프 넘버",
688 + solved_date: "20190628",
689 + },
690 + {
691 + problem_number: "15596",
692 + problem_title: "정수 N개의 합",
693 + solved_date: "20190628",
694 + },
695 + {
696 + problem_number: "4344",
697 + problem_title: "평균은 넘겠지",
698 + solved_date: "20190628",
699 + },
700 + { problem_number: "2920", problem_title: "음계", solved_date: "20190628" },
701 + { problem_number: "8958", problem_title: "OX퀴즈", solved_date: "20190628" },
702 + { problem_number: "1546", problem_title: "평균", solved_date: "20190628" },
703 + {
704 + problem_number: "2577",
705 + problem_title: "숫자의 개수",
706 + solved_date: "20190628",
707 + },
708 + { problem_number: "2562", problem_title: "최댓값", solved_date: "20190628" },
709 + {
710 + problem_number: "1110",
711 + problem_title: "더하기 사이클",
712 + solved_date: "20190628",
713 + },
714 + {
715 + problem_number: "10951",
716 + problem_title: "A+B - 4",
717 + solved_date: "20190628",
718 + },
719 + {
720 + problem_number: "10952",
721 + problem_title: "A+B - 5",
722 + solved_date: "20190628",
723 + },
724 + {
725 + problem_number: "10871",
726 + problem_title: "X보다 작은 수",
727 + solved_date: "20190628",
728 + },
729 + {
730 + problem_number: "2439",
731 + problem_title: "별 찍기 - 2",
732 + solved_date: "20190628",
733 + },
734 + {
735 + problem_number: "2438",
736 + problem_title: "별 찍기 - 1",
737 + solved_date: "20190628",
738 + },
739 + {
740 + problem_number: "11022",
741 + problem_title: "A+B - 8",
742 + solved_date: "20190628",
743 + },
744 + {
745 + problem_number: "11021",
746 + problem_title: "A+B - 7",
747 + solved_date: "20190628",
748 + },
749 + { problem_number: "2742", problem_title: "기찍 N", solved_date: "20190628" },
750 + { problem_number: "2741", problem_title: "N 찍기", solved_date: "20190628" },
751 + {
752 + problem_number: "15552",
753 + problem_title: "빠른 A+B",
754 + solved_date: "20190628",
755 + },
756 + { problem_number: "8393", problem_title: "합", solved_date: "20190628" },
757 + {
758 + problem_number: "10950",
759 + problem_title: "A+B - 3",
760 + solved_date: "20190628",
761 + },
762 + { problem_number: "2739", problem_title: "구구단", solved_date: "20190628" },
763 + { problem_number: "10817", problem_title: "세 수", solved_date: "20190627" },
764 + {
765 + problem_number: "2884",
766 + problem_title: "알람 시계",
767 + solved_date: "20190627",
768 + },
769 + { problem_number: "2753", problem_title: "윤년", solved_date: "20190627" },
770 + {
771 + problem_number: "9498",
772 + problem_title: "시험 성적",
773 + solved_date: "20190627",
774 + },
775 + {
776 + problem_number: "1330",
777 + problem_title: "두 수 비교하기",
778 + solved_date: "20190627",
779 + },
780 + { problem_number: "2588", problem_title: "곱셈", solved_date: "20190627" },
781 + { problem_number: "10430", problem_title: "나머지", solved_date: "20190627" },
782 + {
783 + problem_number: "10869",
784 + problem_title: "사칙연산",
785 + solved_date: "20190627",
786 + },
787 + { problem_number: "1008", problem_title: "A/B", solved_date: "20190627" },
788 + { problem_number: "10998", problem_title: "A×B", solved_date: "20190627" },
789 + { problem_number: "7287", problem_title: "등록", solved_date: "20190627" },
790 + { problem_number: "10172", problem_title: "개", solved_date: "20190627" },
791 + { problem_number: "10171", problem_title: "고양이", solved_date: "20190627" },
792 + {
793 + problem_number: "10718",
794 + problem_title: "We love kriii",
795 + solved_date: "20190627",
796 + },
797 + { problem_number: "1001", problem_title: "A-B", solved_date: "20190607" },
798 + { problem_number: "1000", problem_title: "A+B", solved_date: "20190607" },
799 + {
800 + problem_number: "2557",
801 + problem_title: "Hello World",
802 + solved_date: "20190607",
803 + },
208 ]; 804 ];
......
...@@ -20,6 +20,17 @@ ProfileSchema.methods.getBJID = function () { ...@@ -20,6 +20,17 @@ ProfileSchema.methods.getBJID = function () {
20 ProfileSchema.methods.getBJdata = function () { 20 ProfileSchema.methods.getBJdata = function () {
21 return this.solvedBJ; 21 return this.solvedBJ;
22 }; 22 };
23 +ProfileSchema.methods.getslackURL = function () {
24 + return this.slackWebHookURL;
25 +};
26 +ProfileSchema.methods.getgoalNum = function () {
27 + return this.goalNum;
28 +};
29 +ProfileSchema.methods.getTodaySovled = function () {
30 + if (this.solvedBJ_date) {
31 + return this.solvedBJ_date.presentNum;
32 + }
33 +};
23 34
24 ProfileSchema.methods.serialize = function () { 35 ProfileSchema.methods.serialize = function () {
25 const data = this.toJSON(); 36 const data = this.toJSON();
......
1 exports.compareBJ = function (solvedBJ_new, problem_set) { 1 exports.compareBJ = function (solvedBJ_new, problem_set) {
2 try { 2 try {
3 let new_obj = []; 3 let new_obj = [];
4 - for (let i = 0; i < solvedBJ_new.length; i++) { 4 +
5 - if (!problem_set.includes(String(solvedBJ_new[i].problem_number))) { 5 + for (let i = 0; i < problem_set.length; i++) {
6 - new_obj.push(solvedBJ_new[i]); 6 + let found = false;
7 + for (let j = 0; j < solvedBJ_new.length; j++) {
8 + if (solvedBJ_new[j].problem_number == problem_set[i].problem_number) {
9 + found = true;
10 + break;
11 + }
12 + }
13 + if (!found) {
14 + new_obj.push(problem_set[i]);
7 } 15 }
8 } 16 }
17 + console.log(new_obj);
9 return new_obj; 18 return new_obj;
10 } catch (e) { 19 } catch (e) {
11 console.log(e); 20 console.log(e);
......
1 const Slack = require("slack-node"); // 슬랙 모듈 사용 1 const Slack = require("slack-node"); // 슬랙 모듈 사용
2 2
3 +/*
3 const webhookUri = 4 const webhookUri =
4 - "https://hooks.slack.com/services/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"; // Webhook URL 5 + "https://hooks.slack.com/services/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"; // Webhook URL
6 +*/
5 7
6 -const slack = new Slack(); 8 +exports.send = async (message, webhookUri) => {
7 -slack.setWebhook(webhookUri); 9 + const slack = new Slack();
8 - 10 + slack.setWebhook(webhookUri);
9 -const send = async (message) => {
10 slack.webhook( 11 slack.webhook(
11 { 12 {
12 text: message, 13 text: message,
...@@ -16,5 +17,3 @@ const send = async (message) => { ...@@ -16,5 +17,3 @@ const send = async (message) => {
16 } 17 }
17 ); 18 );
18 }; 19 };
19 -
20 -send("hello");
......
...@@ -8,7 +8,7 @@ const test = async (userid) => { ...@@ -8,7 +8,7 @@ const test = async (userid) => {
8 return_lst.push(lst[i].problem_number); 8 return_lst.push(lst[i].problem_number);
9 } 9 }
10 10
11 - var stringJson = JSON.stringify(return_lst) + "\n"; 11 + var stringJson = JSON.stringify(lst) + "\n";
12 fs.open("test.json", "a", "666", function (err, id) { 12 fs.open("test.json", "a", "666", function (err, id) {
13 if (err) { 13 if (err) {
14 console.log("file open err!!"); 14 console.log("file open err!!");
......
...@@ -206,3 +206,4 @@ ...@@ -206,3 +206,4 @@
206 "1000", 206 "1000",
207 "2557" 207 "2557"
208 ] 208 ]
209 +[{"problem_number":"1517","problem_title":"버블 소트","solved_date":"20200621"},{"problem_number":"2448","problem_title":"별 찍기 - 11","solved_date":"20200621"},{"problem_number":"1891","problem_title":"사분면","solved_date":"20200621"},{"problem_number":"1074","problem_title":"Z","solved_date":"20200620"},{"problem_number":"2263","problem_title":"트리의 순회","solved_date":"20200620"},{"problem_number":"1780","problem_title":"종이의 개수","solved_date":"20200619"},{"problem_number":"11728","problem_title":"배열 합치기","solved_date":"20200619"},{"problem_number":"10816","problem_title":"숫자 카드 2","solved_date":"20200619"},{"problem_number":"10815","problem_title":"숫자 카드","solved_date":"20200619"},{"problem_number":"2109","problem_title":"순회강연","solved_date":"20200619"},{"problem_number":"1202","problem_title":"보석 도둑","solved_date":"20200619"},{"problem_number":"1285","problem_title":"동전 뒤집기","solved_date":"20200617"},{"problem_number":"2138","problem_title":"전구와 스위치","solved_date":"20200617"},{"problem_number":"1080","problem_title":"행렬","solved_date":"20200617"},{"problem_number":"11399","problem_title":"ATM","solved_date":"20200616"},{"problem_number":"1931","problem_title":"회의실배정","solved_date":"20200616"},{"problem_number":"11047","problem_title":"동전 0","solved_date":"20200615"},{"problem_number":"15666","problem_title":"N과 M (12)","solved_date":"20200614"},{"problem_number":"15665","problem_title":"N과 M (11)","solved_date":"20200614"},{"problem_number":"15664","problem_title":"N과 M (10)","solved_date":"20200614"},{"problem_number":"15663","problem_title":"N과 M (9)","solved_date":"20200614"},{"problem_number":"15657","problem_title":"N과 M (8)","solved_date":"20200614"},{"problem_number":"15656","problem_title":"N과 M (7)","solved_date":"20200614"},{"problem_number":"15655","problem_title":"N과 M (6)","solved_date":"20200614"},{"problem_number":"15654","problem_title":"N과 M (5)","solved_date":"20200614"},{"problem_number":"15652","problem_title":"N과 M (4)","solved_date":"20200614"},{"problem_number":"15651","problem_title":"N과 M (3)","solved_date":"20200612"},{"problem_number":"15650","problem_title":"N과 M (2)","solved_date":"20200612"},{"problem_number":"15649","problem_title":"N과 M (1)","solved_date":"20200612"},{"problem_number":"6603","problem_title":"로또","solved_date":"20200612"},{"problem_number":"10971","problem_title":"외판원 순회 2","solved_date":"20200611"},{"problem_number":"10819","problem_title":"차이를 최대로","solved_date":"20200611"},{"problem_number":"10973","problem_title":"이전 순열","solved_date":"20200611"},{"problem_number":"10974","problem_title":"모든 순열","solved_date":"20200611"},{"problem_number":"10972","problem_title":"다음 순열","solved_date":"20200611"},{"problem_number":"7576","problem_title":"토마토","solved_date":"20200608"},{"problem_number":"1248","problem_title":"맞춰봐","solved_date":"20200312"},{"problem_number":"2529","problem_title":"부등호","solved_date":"20200311"},{"problem_number":"15661","problem_title":"링크와 스타트","solved_date":"20200311"},{"problem_number":"14501","problem_title":"퇴사","solved_date":"20200311"},{"problem_number":"1759","problem_title":"암호 만들기","solved_date":"20200310"},{"problem_number":"14391","problem_title":"종이 조각","solved_date":"20200306"},{"problem_number":"14889","problem_title":"스타트와 링크","solved_date":"20200305"},{"problem_number":"1182","problem_title":"부분수열의 합","solved_date":"20200305"},{"problem_number":"11723","problem_title":"집합","solved_date":"20200305"},{"problem_number":"1748","problem_title":"수 이어 쓰기 1","solved_date":"20200305"},{"problem_number":"6064","problem_title":"카잉 달력","solved_date":"20200305"},{"problem_number":"1107","problem_title":"리모컨","solved_date":"20200305"},{"problem_number":"3085","problem_title":"사탕 게임","solved_date":"20200305"},{"problem_number":"2309","problem_title":"일곱 난쟁이","solved_date":"20200305"},{"problem_number":"1748","problem_title":"수 이어 쓰기 1","solved_date":"20200228"},{"problem_number":"14500","problem_title":"테트로미노","solved_date":"20200228"},{"problem_number":"1107","problem_title":"리모컨","solved_date":"20200228"},{"problem_number":"1476","problem_title":"날짜 계산","solved_date":"20200228"},{"problem_number":"3085","problem_title":"사탕 게임","solved_date":"20200228"},{"problem_number":"2309","problem_title":"일곱 난쟁이","solved_date":"20200228"},{"problem_number":"1261","problem_title":"알고스팟","solved_date":"20200228"},{"problem_number":"13549","problem_title":"숨바꼭질 3","solved_date":"20200227"},{"problem_number":"14226","problem_title":"이모티콘","solved_date":"20200227"},{"problem_number":"13913","problem_title":"숨바꼭질 4","solved_date":"20200227"},{"problem_number":"1697","problem_title":"숨바꼭질","solved_date":"20200227"},{"problem_number":"1967","problem_title":"트리의 지름","solved_date":"20200221"},{"problem_number":"1167","problem_title":"트리의 지름","solved_date":"20200221"},{"problem_number":"11725","problem_title":"트리의 부모 찾기","solved_date":"20200221"},{"problem_number":"2250","problem_title":"트리의 높이와 너비","solved_date":"20200221"},{"problem_number":"1991","problem_title":"트리 순회","solved_date":"20200221"},{"problem_number":"7562","problem_title":"나이트의 이동","solved_date":"20200220"},{"problem_number":"2178","problem_title":"미로 탐색","solved_date":"20200220"},{"problem_number":"4963","problem_title":"섬의 개수","solved_date":"20200219"},{"problem_number":"2667","problem_title":"단지번호붙이기","solved_date":"20200219"},{"problem_number":"1707","problem_title":"이분 그래프","solved_date":"20200217"},{"problem_number":"11724","problem_title":"연결 요소의 개수","solved_date":"20200214"},{"problem_number":"1260","problem_title":"DFS와 BFS","solved_date":"20200214"},{"problem_number":"13023","problem_title":"ABCDE","solved_date":"20200213"},{"problem_number":"11652","problem_title":"카드","solved_date":"20200210"},{"problem_number":"1377","problem_title":"버블 소트","solved_date":"20200210"},{"problem_number":"11004","problem_title":"K번째 수","solved_date":"20200210"},{"problem_number":"10825","problem_title":"국영수","solved_date":"20200210"},{"problem_number":"2751","problem_title":"수 정렬하기 2","solved_date":"20200210"},{"problem_number":"9461","problem_title":"파도반 수열","solved_date":"20200205"},{"problem_number":"1699","problem_title":"제곱수의 합","solved_date":"20200205"},{"problem_number":"9095","problem_title":"1, 2, 3 더하기","solved_date":"20200205"},{"problem_number":"2225","problem_title":"합분해","solved_date":"20200205"},{"problem_number":"2133","problem_title":"타일 채우기","solved_date":"20200204"},{"problem_number":"11727","problem_title":"2×n 타일링 2","solved_date":"20200203"},{"problem_number":"11726","problem_title":"2×n 타일링","solved_date":"20200203"},{"problem_number":"1463","problem_title":"1로 만들기","solved_date":"20200203"},{"problem_number":"2748","problem_title":"피보나치 수 2","solved_date":"20200203"},{"problem_number":"2747","problem_title":"피보나치 수","solved_date":"20200203"},{"problem_number":"11656","problem_title":"접미사 배열","solved_date":"20200203"},{"problem_number":"10824","problem_title":"네 수","solved_date":"20200203"},{"problem_number":"2743","problem_title":"단어 길이 재기","solved_date":"20200203"},{"problem_number":"10820","problem_title":"문자열 분석","solved_date":"20200203"},{"problem_number":"10808","problem_title":"알파벳 개수","solved_date":"20200203"},{"problem_number":"11655","problem_title":"ROT13","solved_date":"20200203"},{"problem_number":"11720","problem_title":"숫자의 합","solved_date":"20200131"},{"problem_number":"1008","problem_title":"A/B","solved_date":"20200131"},{"problem_number":"10951","problem_title":"A+B - 4","solved_date":"20200131"},{"problem_number":"2557","problem_title":"Hello World","solved_date":"20200131"},{"problem_number":"1021","problem_title":"회전하는 큐","solved_date":"20200131"},{"problem_number":"1966","problem_title":"프린터 큐","solved_date":"20200131"},{"problem_number":"2164","problem_title":"카드2","solved_date":"20200131"},{"problem_number":"10799","problem_title":"쇠막대기","solved_date":"20200131"},{"problem_number":"17413","problem_title":"단어 뒤집기 2","solved_date":"20200131"},{"problem_number":"10866","problem_title":"덱","solved_date":"20200131"},{"problem_number":"1158","problem_title":"요세푸스 문제","solved_date":"20200131"},{"problem_number":"10845","problem_title":"큐","solved_date":"20200130"},{"problem_number":"1406","problem_title":"에디터","solved_date":"20200130"},{"problem_number":"1874","problem_title":"스택 수열","solved_date":"20200130"},{"problem_number":"9012","problem_title":"괄호","solved_date":"20200130"},{"problem_number":"9093","problem_title":"단어 뒤집기","solved_date":"20200130"},{"problem_number":"10828","problem_title":"스택","solved_date":"20200129"},{"problem_number":"11721","problem_title":"열 개씩 끊어 출력하기","solved_date":"20200126"},{"problem_number":"11719","problem_title":"그대로 출력하기 2","solved_date":"20200126"},{"problem_number":"11718","problem_title":"그대로 출력하기","solved_date":"20200126"},{"problem_number":"10953","problem_title":"A+B - 6","solved_date":"20200126"},{"problem_number":"2558","problem_title":"A+B - 2","solved_date":"20200126"},{"problem_number":"10814","problem_title":"나이순 정렬","solved_date":"20200123"},{"problem_number":"1181","problem_title":"단어 정렬","solved_date":"20200122"},{"problem_number":"11651","problem_title":"좌표 정렬하기 2","solved_date":"20200122"},{"problem_number":"11650","problem_title":"좌표 정렬하기","solved_date":"20200122"},{"problem_number":"1427","problem_title":"소트인사이드","solved_date":"20190823"},{"problem_number":"2108","problem_title":"통계학","solved_date":"20190823"},{"problem_number":"10989","problem_title":"수 정렬하기 3","solved_date":"20190823"},{"problem_number":"2751","problem_title":"수 정렬하기 2","solved_date":"20190814"},{"problem_number":"2750","problem_title":"수 정렬하기","solved_date":"20190814"},{"problem_number":"1436","problem_title":"영화감독 숌","solved_date":"20190814"},{"problem_number":"1018","problem_title":"체스판 다시 칠하기","solved_date":"20190814"},{"problem_number":"7568","problem_title":"덩치","solved_date":"20190814"},{"problem_number":"2231","problem_title":"분해합","solved_date":"20190814"},{"problem_number":"2798","problem_title":"블랙잭","solved_date":"20190814"},{"problem_number":"1002","problem_title":"터렛","solved_date":"20190814"},{"problem_number":"3053","problem_title":"택시 기하학","solved_date":"20190814"},{"problem_number":"4153","problem_title":"직각삼각형","solved_date":"20190814"},{"problem_number":"3009","problem_title":"네 번째 점","solved_date":"20190814"},{"problem_number":"1085","problem_title":"직사각형에서 탈출","solved_date":"20190814"},{"problem_number":"9020","problem_title":"골드바흐의 추측","solved_date":"20190814"},{"problem_number":"4948","problem_title":"베르트랑 공준","solved_date":"20190814"},{"problem_number":"1929","problem_title":"소수 구하기","solved_date":"20190814"},{"problem_number":"2581","problem_title":"소수","solved_date":"20190811"},{"problem_number":"1978","problem_title":"소수 찾기","solved_date":"20190811"},{"problem_number":"2292","problem_title":"벌집","solved_date":"20190811"},{"problem_number":"6064","problem_title":"카잉 달력","solved_date":"20190811"},{"problem_number":"2775","problem_title":"부녀회장이 될테야","solved_date":"20190811"},{"problem_number":"10250","problem_title":"ACM 호텔","solved_date":"20190811"},{"problem_number":"2869","problem_title":"달팽이는 올라가고 싶다","solved_date":"20190811"},{"problem_number":"1011","problem_title":"Fly me to the Alpha Centauri","solved_date":"20190811"},{"problem_number":"1193","problem_title":"분수찾기","solved_date":"20190810"},{"problem_number":"2839","problem_title":"설탕 배달","solved_date":"20190809"},{"problem_number":"1712","problem_title":"손익분기점","solved_date":"20190809"},{"problem_number":"1316","problem_title":"그룹 단어 체커","solved_date":"20190809"},{"problem_number":"2941","problem_title":"크로아티아 알파벳","solved_date":"20190809"},{"problem_number":"5622","problem_title":"다이얼","solved_date":"20190809"},{"problem_number":"2908","problem_title":"상수","solved_date":"20190809"},{"problem_number":"1152","problem_title":"단어의 개수","solved_date":"20190809"},{"problem_number":"1157","problem_title":"단어 공부","solved_date":"20190809"},{"problem_number":"2675","problem_title":"문자열 반복","solved_date":"20190809"},{"problem_number":"10809","problem_title":"알파벳 찾기","solved_date":"20190809"},{"problem_number":"11720","problem_title":"숫자의 합","solved_date":"20190809"},{"problem_number":"11654","problem_title":"아스키 코드","solved_date":"20190809"},{"problem_number":"11729","problem_title":"하노이 탑 이동 순서","solved_date":"20190809"},{"problem_number":"2447","problem_title":"별 찍기 - 10","solved_date":"20190809"},{"problem_number":"3052","problem_title":"나머지","solved_date":"20190807"},{"problem_number":"10818","problem_title":"최소, 최대","solved_date":"20190807"},{"problem_number":"10872","problem_title":"팩토리얼","solved_date":"20190628"},{"problem_number":"10870","problem_title":"피보나치 수 5","solved_date":"20190628"},{"problem_number":"1065","problem_title":"한수","solved_date":"20190628"},{"problem_number":"4673","problem_title":"셀프 넘버","solved_date":"20190628"},{"problem_number":"15596","problem_title":"정수 N개의 합","solved_date":"20190628"},{"problem_number":"4344","problem_title":"평균은 넘겠지","solved_date":"20190628"},{"problem_number":"2920","problem_title":"음계","solved_date":"20190628"},{"problem_number":"8958","problem_title":"OX퀴즈","solved_date":"20190628"},{"problem_number":"1546","problem_title":"평균","solved_date":"20190628"},{"problem_number":"2577","problem_title":"숫자의 개수","solved_date":"20190628"},{"problem_number":"2562","problem_title":"최댓값","solved_date":"20190628"},{"problem_number":"1110","problem_title":"더하기 사이클","solved_date":"20190628"},{"problem_number":"10951","problem_title":"A+B - 4","solved_date":"20190628"},{"problem_number":"10952","problem_title":"A+B - 5","solved_date":"20190628"},{"problem_number":"10871","problem_title":"X보다 작은 수","solved_date":"20190628"},{"problem_number":"2439","problem_title":"별 찍기 - 2","solved_date":"20190628"},{"problem_number":"2438","problem_title":"별 찍기 - 1","solved_date":"20190628"},{"problem_number":"11022","problem_title":"A+B - 8","solved_date":"20190628"},{"problem_number":"11021","problem_title":"A+B - 7","solved_date":"20190628"},{"problem_number":"2742","problem_title":"기찍 N","solved_date":"20190628"},{"problem_number":"2741","problem_title":"N 찍기","solved_date":"20190628"},{"problem_number":"15552","problem_title":"빠른 A+B","solved_date":"20190628"},{"problem_number":"8393","problem_title":"합","solved_date":"20190628"},{"problem_number":"10950","problem_title":"A+B - 3","solved_date":"20190628"},{"problem_number":"2739","problem_title":"구구단","solved_date":"20190628"},{"problem_number":"10817","problem_title":"세 수","solved_date":"20190627"},{"problem_number":"2884","problem_title":"알람 시계","solved_date":"20190627"},{"problem_number":"2753","problem_title":"윤년","solved_date":"20190627"},{"problem_number":"9498","problem_title":"시험 성적","solved_date":"20190627"},{"problem_number":"1330","problem_title":"두 수 비교하기","solved_date":"20190627"},{"problem_number":"2588","problem_title":"곱셈","solved_date":"20190627"},{"problem_number":"10430","problem_title":"나머지","solved_date":"20190627"},{"problem_number":"10869","problem_title":"사칙연산","solved_date":"20190627"},{"problem_number":"1008","problem_title":"A/B","solved_date":"20190627"},{"problem_number":"10998","problem_title":"A×B","solved_date":"20190627"},{"problem_number":"7287","problem_title":"등록","solved_date":"20190627"},{"problem_number":"10172","problem_title":"개","solved_date":"20190627"},{"problem_number":"10171","problem_title":"고양이","solved_date":"20190627"},{"problem_number":"10718","problem_title":"We love kriii","solved_date":"20190627"},{"problem_number":"1001","problem_title":"A-B","solved_date":"20190607"},{"problem_number":"1000","problem_title":"A+B","solved_date":"20190607"},{"problem_number":"2557","problem_title":"Hello World","solved_date":"20190607"}]
......