标签:else http include 一个 swa long 答案 class bit
1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 ll n,m,ans; 5 void dfs(ll a,ll b){ 6 ans+=a/b; 7 if (!(a%b)) return; else dfs(b,a%b); 8 } 9 int main(){ 10 scanf("%lld%lld",&n,&m); 11 if (n<m) swap(n,m); 12 dfs(n,m); 13 printf("%lld\n",ans+1); 14 return 0; 15 }
标签:else http include 一个 swa long 答案 class bit
原文地址:http://www.cnblogs.com/zhuchenrui/p/7552708.html