当前位置:网站首页>D24:divisor and multiple (divisor and multiple, translation + solution)
D24:divisor and multiple (divisor and multiple, translation + solution)
2022-07-03 23:14:00 【Aggressive Wenwen】
The original title is :OpenJudge - 24:Divisor and Multiple
translate :
describe : Given D and M,D yes A、B The divisor of ,M yes A、B Multiple . seek A and B;
Input : Two no more than 100 The positive integer D and M;
Output : Two integers A and B.
Code :
#include<iostream>
using namespace std;
int main()
{
int d,m,i,f=1;
cin>>d>>m;
for(int i=2*d;i<m;i+=d)
if(m%i==0){
if(f){
cout<<i<<" ";
f=0;
}
else{
cout<<i;
break;
}
}
return 0;
}边栏推荐
- Unsafe and CAS principle
- SDMU OJ#P19. Stock trading
- 1 Introduction to spark Foundation
- 在恒泰证券开户怎么样?安全吗?
- Flutter internationalized Intl
- Ppt image processing
- Interpretation of corolla sub low configuration, three cylinder power configuration, CVT fuel saving and smooth, safety configuration is in place
- [note] IPC traditional interprocess communication and binder interprocess communication principle
- How can I get the Commission discount of stock trading account opening? Is it safe to open an account online
- The first game of the new year, many bug awards submitted
猜你喜欢

MLX90614 driver, function introduction and PEC verification

QT creator source code learning note 05, how does the menu bar realize plug-in?

Pan Yueming helps Germany's Rochester Zodiac custom wristwatch

Blue Bridge Cup -- Mason prime

540. Single element in ordered array

X Opencv feature point detection and matching

A treasure open source software, cross platform terminal artifact tabby

Programming language (2)

Opengauss database log management guide

Format cluster and start cluster
随机推荐
The 2022 global software R & D technology conference was released, and world-class masters such as Turing prize winners attended
Learning methods of zynq
2/14 (regular expression, sed streaming editor)
Hcip day 14 notes
NPM script
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
string
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
股票开户最低佣金炒股开户免费,网上开户安全吗
Yyds dry goods inventory [practical] simply encapsulate JS cycle with FP idea~
Bufferpool caching mechanism for executing SQL in MySQL
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
How to quickly build high availability of service discovery
Druids connect to mysql8.0.11
Format cluster and start cluster
How about opening an account at Hengtai securities? Is it safe?
Es6~es12 knowledge sorting and summary
Pat grade A - 1164 good in C (20 points)
Pandaoxi's video
How to prevent malicious crawling of information by one-to-one live broadcast source server