์ƒˆ์†Œ์‹

๐Ÿงฎ PS

์ฝ”๋“œ์—… (Code up) 1047~1048 (๋น„ํŠธ์‹œํ”„ํŠธ) [ C++, CPP ]

  • -

๋ฌธ์ œ ๋งํฌ : https://codeup.kr/problemsetsol.php?psid=23

 

๋ฌธ์ œ์ง‘ / ๊ธฐ์ดˆ 100์ œ

 

codeup.kr

 

 

*1047๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    int a;
    cin >> a;
    cout << (a << 1); 
}

 

๋น„ํŠธ์‹œํ”„ํŠธ. (๋ณ€์ˆ˜ << n) : ์™ผ์ชฝ์œผ๋กœ nํšŒ ์‹œํ”„ํŠธ

 

*1048๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    int a, b;
    cin >> a >> b;
    cout << (a << b);
}

 

Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.