~~真暴力不过我喜欢~~
by hjwbwcy @ 2017-08-03 15:54:20
+1
by 郑翔弈 @ 2017-12-05 16:04:05
+1
by 青珹 @ 2018-03-27 18:43:43
平底锅警告
by 苏钦云 @ 2018-08-14 20:34:27
+1
by mars20070420 @ 2018-09-25 18:42:16
+1
by stefazin @ 2018-10-16 10:38:23
~~**+1**~~
by Rumfineo @ 2019-01-24 19:24:52
真的没有别的办法了吗
by 黄油猫发电厂 @ 2019-02-16 12:02:45
当然有别的办法,开$unsigned-long-long$, 用取模%(mod)运算,避免了溢出和超时,什么LE通统没有的
```cpp
#include<bits/stdc++.h>
using namespace std;
unsigned long long x,y,po=0;
int main(){
cin>>x>>y;
if(y>x)swap(y,x);
while(x%y!=0){
po+=x/y*y*4;
x%=y;
if(y>x)swap(y,x);
}
po+=x*4;
cout<<po<<endl;
return 0;
}
//亲测AC100分!!
```
不过大家还是自己写代码的好 ~~抄一下也无伤大雅~~
by 王紫烨 @ 2019-04-20 22:13:19
**R18403942 自己看**
by 王紫烨 @ 2019-04-20 22:14:00