๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm ๐Ÿง‘๐Ÿป‍๐Ÿ’ป/๋ฐฑ์ค€(BOJ)

[๋ฐฑ์ค€,c++] 10824๋ฒˆ - ๋„ค ์ˆ˜

by dkswnkk 2021. 10. 25.
 

10824๋ฒˆ: ๋„ค ์ˆ˜

์ฒซ์งธ ์ค„์— ๋„ค ์ž์—ฐ์ˆ˜ A, B, C, D๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. (1 ≤ A, B, C, D ≤ 1,000,000)

www.acmicpc.net

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    string temp1, temp2;
    string a, b, c, d; cin >> a >> b >> c >> d;
    temp1 = a + b;
    temp2 = c + d;
    cout << stoll(temp1) + stoll(temp2);

}

๋Œ“๊ธ€