www.acmicpc.net/problem/2557 : Hello World
#include <iostream>
using namespace std;
int main(void){
cout << "Hello World!" << endl;
}
www.acmicpc.net/problem/10718 : We love kriii
#include <iostream>
using namespace std;
int main(void){
cout << "강한친구 대한육군" << endl;
cout << "강한친구 대한육군" << endl;
}
www.acmicpc.net/problem/10171 : 고양이
#include <iostream>
using namespace std;
int main(void){
cout << "\\ /\\" << endl;
cout << " ) ( ')" << endl;
cout << "( / )" << endl;
cout << " \\(__)|" << endl;
}
www.acmicpc.net/problem/10172 : 개
#include <iostream>
using namespace std;
int main(void){
cout << "|\\_/|" << endl;
cout << "|q p| /}" << endl;
cout << "( 0 )\"\"\"\\" << endl;
cout << "|\"^\"` |" << endl;
cout << "||_/=\\\\__|" << endl;
}
www.acmicpc.net/problem/1000 : A + B
#include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b;
cout << a + b << endl;
}
www.acmicpc.net/problem/1001 : A - B
#include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b;
cout << a - b << endl;
}
www.acmicpc.net/problem/10998 : A X B
#include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b;
cout << a * b << endl;
}
www.acmicpc.net/problem/1008 : A / B
#include <iostream>
using namespace std;
int main(void){
long double a, b;
cin >> a >> b;
cout.precision(9);
cout << fixed;
cout << a / b << endl;
}
www.acmicpc.net/problem/10869 : 사칙연산
#include <iostream>
using namespace std;
int main(void){
long double a, b;
cin >> a >> b;
cout << a + b << endl << a - b << endl << a * b << endl;
cout << int(a / b) << endl;
cout << int(a) % int(b) << endl;
}
www.acmicpc.net/problem/10430 : 나머지
#include <iostream>
using namespace std;
int main(void){
int a, b, c;
cin >> a >> b >> c;
cout << (a + b) % c << endl << ((a % c) + (b % c)) % c << endl;
cout << (a * b) % c << endl << ((a % c) * (b % c)) % c << endl;
}
www.acmicpc.net/problem/2588 : 곱셈
#include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b;
cout << a * (b % 10) << endl;
cout << a * ((b % 100) / 10) << endl;
cout << a * (b / 100) << endl;
cout << a * b << endl;
}