博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Finding LCM LightOJ - 1215 (水题)
阅读量:4614 次
发布时间:2019-06-09

本文共 846 字,大约阅读时间需要 2 分钟。

这题和这题一样。。。。。。只不过多了个数。。。

 

https://www.cnblogs.com/WTSRUVF/p/9316412.html

 

#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define rap(a, n) for(int i=1; i<=n; i++)#define MOD 2018#define LL long long#define ULL unsigned long long#define Pair pair
#define mem(a, b) memset(a, b, sizeof(a))#define _ ios_base::sync_with_stdio(0),cin.tie(0)//freopen("1.txt", "r", stdin);using namespace std;const int maxn = 10010, INF = 0x7fffffff;LL gcd(LL a, LL b){ return b==0?a:gcd(b, a%b);}int main(){ int T, kase = 0; cin>> T; while(T--) { LL a, b, L; cin>> a >> b >> L; printf("Case %d: ", ++kase); LL c = a * b / gcd(a, b); if(L % c) { cout<< "impossible" <

 

转载于:https://www.cnblogs.com/WTSRUVF/p/9350242.html

你可能感兴趣的文章
2018 leetcode
查看>>
各浏览器对 onbeforeunload 事件的支持与触发条件实现有差异
查看>>
PHP中获取当前页面的完整URL
查看>>
所谓输入掩码技术,即只有数字键起作用
查看>>
Display对象,Displayable对象
查看>>
安装oracle11G,10G时都会出现:注册ocx时出现OLE初始化错误或ocx装载错误对话框
查看>>
数据结构(并查集):COGS 260. [NOI2002] 银河英雄传说
查看>>
生产环境下正则的应用实例(一)
查看>>
在CentOS7命令行模式下安装虚拟机
查看>>
Arduino可穿戴开发入门教程Arduino开发环境介绍
查看>>
Windows平台flex+gcc词法分析实验工具包
查看>>
3.Python基础 序列sequence
查看>>
Chapter 4 Syntax Analysis
查看>>
3、变量+运算符+Scanner
查看>>
10、数组、二维数组
查看>>
eclipse查看源码的配置
查看>>
针对发送网络附件的java方法(使用Apache的jar包调用)
查看>>
sql把一个字段中的特定字符替换成其他字符
查看>>
SQLServer触发器的使用
查看>>
通过AI识图判断图片是否为小票
查看>>