(HDU)1418-- 抱歉

题目链接:https://vjudge.net/problem/HDU-1418

欧拉公式的使用

 1 #include <cstdio>
 2 #include <cstring>
 3 #include <cmath>
 4 #include <iostream>
 5 #include <algorithm>
 6 #include <string>
 7 #include <cstdlib>
 8 
 9 using namespace std;
10 
11 int main()
12 {
13     long long n,m;
14     while(~scanf("%lld %lld",&n,&m))
15     {
16         if(m==0&&n==0) break;
17         printf("%lld
",n+m-2);
18     }
19     return 0;
20 }
原文地址:https://www.cnblogs.com/ACDoge/p/6141151.html