当前位置:网站首页>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;
}
边栏推荐
- Get current JVM data
- C deep anatomy - the concept of keywords and variables # dry inventory #
- Programming language (1)
- Fluent learning (5) GridView
- How to switch between dual graphics cards of notebook computer
- Weekly leetcode - nc9/nc56/nc89/nc126/nc69/nc120
- C # basic knowledge (1)
- Go Technology Daily (2022-02-13) - Summary of experience in database storage selection
- A preliminary study on the middleware of script Downloader
- How to solve the problem of requiring a password when accessing your network neighborhood on your computer
猜你喜欢
Qtoolbutton available signal
Programming language (2)
Exclusive download! Alibaba cloud native brings 10 + technical experts to bring "new possibilities of cloud native and cloud future"
Can you draw with turtle?
EPF: a fuzzy testing framework for network protocols based on evolution, protocol awareness and coverage guidance
How to quickly build high availability of service discovery
Es6~es12 knowledge sorting and summary
Opengauss database log management guide
User login function: simple but difficult
2 spark environment setup local
随机推荐
Maxwell equation and Euler formula - link
Fluent learning (5) GridView
ThreadLocal function, scene and principle
Fashion cloud interview questions series - JS high-frequency handwritten code questions
C deep anatomy - the concept of keywords and variables # dry inventory #
Pyqt5 sensitive word detection tool production, operator's Gospel
Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
33 restrict the input of qlineedit control (verifier)
The 2022 global software R & D technology conference was released, and world-class masters such as Turing prize winners attended
How to switch between dual graphics cards of notebook computer
Summary of fluent systemchrome
Selenium check box
ADB command to get XML
Comment obtenir une commission préférentielle pour l'ouverture d'un compte en bourse? Est - ce que l'ouverture d'un compte en ligne est sécurisée?
JarPath
MLX90614 driver, function introduction and PEC verification
How can enterprises and developers take advantage of the explosion of cloud native landing?
The difference between SRAM and DRAM
How to solve the problem of requiring a password when accessing your network neighborhood on your computer
What are the common computer problems and solutions