传送门:
http://acm.hdu.edu.cn/showproblem.php?pid=1273
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3508 Accepted Submission(s): 2339
#include<bits/stdc++.h> using namespace std; int main() { int n; while(~scanf("%d",&n)) { if(n==0) break; printf("%d\n",(n-1)/2); } return 0; }
原文:https://www.cnblogs.com/yinbiao/p/9326318.html