PS56 [C++] 백준 1929번: 소수 구하기 #include #include using namespace std; int arr[1000001] = { 0, }; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int m, n; cin >> m >> n; arr[0] = 1; arr[1] = 1; for (int i = 2; i 2020. 11. 22. [C++] 백준 1654번: 랜선 자르기 #include #include using namespace std; long long length[10001]; long long high = 0; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int k, n; cin >> k >> n; for (int i = 0; i > length[i]; high < length[i] ? high = length[i] : high; } long long low = 1; long long result = 0; while (low 2020. 11. 22. 이전 1 ··· 7 8 9 10 다음