문제 링크입니다: https://www.acmicpc.net/problem/3507
3507번: Automated Telephone Exchange
In St Petersburg phone numbers are formatted as “XXX–XX–XX”, where the first three digits represent index of the Automated Telephone Exchange (ATE). Each ATE has exactly 10 000 unique phone numbers. Peter has just bought a new flat and now he wants
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int n; | |
cin >> n; | |
int cnt = 0; | |
for (int i = 0; i <= 99; i++) | |
{ | |
for (int j = 0; j <= 99; j++) | |
{ | |
if (i + j == n) | |
{ | |
cnt++; | |
} | |
} | |
} | |
cout << cnt << "\n"; | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 4084번 Viva la Diferencia (0) | 2021.05.15 |
---|---|
백준 3533번 Explicit Formula (0) | 2021.05.15 |
백준 3486번 Adding Reversed Numbers (0) | 2021.05.15 |
백준 3460번 이진수 (0) | 2021.05.14 |
백준 3009번 네 번째 점 (0) | 2021.05.14 |