From 7aa02403f747ab67deb8abbce4636b55bb2a68ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=98=EC=84=B8=EB=B9=88?= <94737768+sebbbin@users.noreply.github.com> Date: Tue, 20 Feb 2024 00:29:50 +0900 Subject: [PATCH 1/2] 240219 --- ...1\341\206\275\341\204\200\341\205\265.cpp" | 27 ++++++++++++++++ ...3\341\206\257\341\204\200\341\205\265.cpp" | 32 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 "\341\204\211\341\205\251\341\204\211\341\205\256 \341\204\216\341\205\241\341\206\275\341\204\200\341\205\265.cpp" create mode 100644 "\341\204\213\341\205\265\341\204\211\341\205\241\341\206\274\341\204\222\341\205\241\341\206\253 \341\204\206\341\205\256\341\206\253\341\204\214\341\205\241 \341\204\206\341\205\241\341\206\253\341\204\203\341\205\263\341\206\257\341\204\200\341\205\265.cpp" diff --git "a/\341\204\211\341\205\251\341\204\211\341\205\256 \341\204\216\341\205\241\341\206\275\341\204\200\341\205\265.cpp" "b/\341\204\211\341\205\251\341\204\211\341\205\256 \341\204\216\341\205\241\341\206\275\341\204\200\341\205\265.cpp" new file mode 100644 index 0000000..89b9024 --- /dev/null +++ "b/\341\204\211\341\205\251\341\204\211\341\205\256 \341\204\216\341\205\241\341\206\275\341\204\200\341\205\265.cpp" @@ -0,0 +1,27 @@ +#include +#include +#include + +using namespace std; + +int solution(int n) { + int answer = 0; + int prime [n+1]; + for(int i=2; i<=n; i++){ + prime[i]=i; + } + for(int i=2; i<=sqrt(n); i++){ + if(prime[i]==0) + continue; + // i*k (k +#include + +using namespace std; + +string solution(string s) { + string answer = ""; + int idx =0; + for(int i=0; i= 'a' && s[i] <= 'z') + { answer.push_back(s[i]- 'a' + 'A');} + else + {answer.push_back(s[i]); + } + } + else{ + if(s[i] >= 'A' && s[i] <= 'Z') + { answer.push_back(s[i]- 'A' + 'a');} + else + {answer.push_back(s[i]); + } + } + idx++; + } + return answer; +} \ No newline at end of file From 4991b4585042e1dba5a777831812caf994d74e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=98=EC=84=B8=EB=B9=88?= <94737768+sebbbin@users.noreply.github.com> Date: Tue, 20 Feb 2024 00:30:21 +0900 Subject: [PATCH 2/2] 240220 --- ...1\341\206\267\341\204\222\341\205\251.cpp" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "\341\204\211\341\205\265\341\204\214\341\205\245 \341\204\213\341\205\241\341\206\267\341\204\222\341\205\251.cpp" diff --git "a/\341\204\211\341\205\265\341\204\214\341\205\245 \341\204\213\341\205\241\341\206\267\341\204\222\341\205\251.cpp" "b/\341\204\211\341\205\265\341\204\214\341\205\245 \341\204\213\341\205\241\341\206\267\341\204\222\341\205\251.cpp" new file mode 100644 index 0000000..d739277 --- /dev/null +++ "b/\341\204\211\341\205\265\341\204\214\341\205\245 \341\204\213\341\205\241\341\206\267\341\204\222\341\205\251.cpp" @@ -0,0 +1,32 @@ +#include +#include +#include + +using namespace std; + +string solution(string s, int n) { + string answer = ""; + for(int i=0; i96){ + if(s[i]+n>122){ + answer.push_back(s[i]+n-26); + } + else{ + answer.push_back(s[i]+n); + } + } + else { + if(s[i]+n>90){ + answer.push_back(s[i]+n-26); + } + else{ + answer.push_back(s[i]+n); + } + } + } + return answer; +} \ No newline at end of file