12 weeks (for the maximum number of books in multiple groups)

Source: Internet
Author: User

12 weeks (for the maximum number of books in multiple groups)

/*
* Copyright (c) 2014, computer College, Yantai University
* All rights reserved.
* File name: test. cpp
* Author: Wang Zhong
* Completion date: January 1, November 16, 2014
* Version No.: v1.0
*
* Problem description: calculate the maximum number of N groups;
* Input Description: Number of n groups, and number of each group;
* Program output: output the maximum common divisor in each group.

# Include

 
  
Using namespace std; int gcd (int x, int y); int main () {int a, B, g, n; cin> n; for (int I = 1; I <= n; ++ I) {cin> a> B; g = gcd (a, B); cout <"the maximum public approx. is:" <

  

   


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.