https://www.acmicpc.net/problem/2739 : 구구단
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = 1; i < 10; i++){
cout << n << " * " << i << " = " << n*i << endl;
}
}
https://www.acmicpc.net/problem/10950 : A + B - 3
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int a, b;
cin >> a >> b;
cout << a + b << endl;
}
}
https://www.acmicpc.net/problem/8393 : 합
#include <iostream>
using namespace std;
int main(void){
int n, count = 0;
cin >> n;
for(int i = 0; i < n; i++)
count += i+1;
cout << count << endl;
}
https://www.acmicpc.net/problem/15552 : 빠른 A+B
#include <iostream>
using namespace std;
int main(void){
int n;
scanf("%d", &n);
for(int i = 0; i < n; i++){
int a, b;
scanf("%d %d", &a, &b);
printf("%d\n", a + b);
}
}
https://www.acmicpc.net/problem/2741 : N 찍기
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = 0; i < n; i++)
printf("%d\n", i+1);
}
https://www.acmicpc.net/problem/2742 : 기찍 N
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = n; i > 0; i--)
printf("%d\n", i);
}
https://www.acmicpc.net/problem/11021 : A + B - 7
#include <iostream>
using namespace std;
int main(void){
int t;
scanf("%d", &t);
for(int i = 0; i < t; i++){
int a, b;
scanf("%d %d", &a, &b);
printf("Case #%d: %d\n", i + 1, a + b);
}
}
https://www.acmicpc.net/problem/11022 : A + B - 8
#include <iostream>
using namespace std;
int main(void){
int t;
scanf("%d", &t);
for(int i = 0; i < t; i++){
int a, b;
scanf("%d %d", &a, &b);
printf("Case #%d: %d + %d = %d\n", i + 1, a, b, a + b);
}
}
https://www.acmicpc.net/problem/2438 : 별 찍기 - 1
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= i; j++)
printf("*");
printf("\n");
}
}
https://www.acmicpc.net/problem/2439 : 별 찍기 - 2
#include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n - i; j++)
printf(" ");
for(int j = 1; j <= i; j++)
printf("*");
printf("\n");
}
}
https://www.acmicpc.net/problem/10871 : X보다 작은 수
#include <iostream>
using namespace std;
int main(void){
int n, x;
cin >> n >> x;
for(int i = 0; i < n; i++){
int t;
cin >> t;
if(t < x) cout << t << " ";
}
}