核桃的数量

来源:互联网 发布:淘宝流量来源分析 编辑:程序博客网 时间:2024/04/25 12:25
#include<stdio.h>#include<algorithm>#include<queue>#include<string.h>#include<ctype.h>#include<set>#include<math.h>using namespace std;int gcd(int a, int b){if (b<a){int temp = a;a = b;b = temp;}while (b != 0){int temp = a%b;a = b;b = temp;}return a;}int main(){int a, b, c;scanf("%d%d%d", &a, &b, &c);int temp = a*b / gcd(a, b);int temp2 = temp*c / gcd(temp, c);printf("%d\n", temp2);}

0 0
原创粉丝点击