|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
【问题描述】
求两个自然数M和N的最大公约数
【输入格式】
输入一行,包括两个整数.
【输出格式】
输出只有一行(这意味着末尾有一个回车符号),包括1个整数。
【输入样例】
45 60
【输出样例】
15
【数据规模】
1<=M,N<=100
【时间限制】
1s
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
两个自然数x和y(0<=x,y<=32767)
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
一个数,即x和y的最大公约数
|
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1545 |
|
其它 |
通过 |
43人 |
提交 |
129次 |
通过率 |
33% |
难度 |
1 |
|
|
|
|
|
|