• Skip to primary navigation
  • Skip to content
  • Skip to footer
Welcome to the development world of chp Welcome to the development world of chp
  • categories
  • tags
    chp

    chp

    99점이 100점이 되기 위해 일을 더하는 개발자

    • South Korea
    • Website
    • GitHub

    [C++] gcd/lcm

    less than 1 minute read

    개요

    • gcd
      • 최대 공약수 계산
    • lcm
      • 최소 공배수 계산


    예제

    • 코드
       #include <iostream>
       #include <numeric>
          
       using namespace std;
          
       int main() {
       	cout << gcd(12, 18) << endl;
       	cout << lcm(12, 18) << endl;
          
       	return 0;
       }
      
    • 실행 결과
       6
       36
      

    Tags: C++, C++17, gcd, lcm, programming-language

    Categories: C++, programming-language

    Updated: October 23, 2022

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    You may also enjoy

    [database] PG Back Web

    1 minute read

    개요 GitHub 사용자 친화적인 웹 인터페이스로 손쉽게 PostgreSQL을 백업하는 툴 데이터의 보안과 가용성을 보장

    [database] DuckDB

    2 minute read

    개요 사이트 SQL(Structured Query Language)을 지원하는 RDBMS

    [Kubernetes] External Secrets Operator

    1 minute read

    개요 사이트 외부 비밀 관리 시스템을 통합하는 Kubernetes operator AWS Secrets Manager HashiCorp Vault Google Secrets Manager Azure Key Vault ...

    [messaging] Centrifugo

    4 minute read

    개요 사이트 오픈소스 실시간 메시징 서버 Centrifuge(Go) 라이브러리를 기반으로 구축 다양한 실시간 전송(WebSocket, HTTP-streaming, SSE/EventSource, WebTransport, GRPC)을 통해 연결된 애플리케이션 온라인 사...

    • Follow:
    • GitHub
    • Feed
    © 2025 Welcome to the development world of chp. Powered by Jekyll & Minimal Mistakes.