Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
bt题目 !!!用下面的code竟然也能AC #include <iostream> #include <cmath> using namespace std; int main() { int a, i = 1; int m, n; float sum = 0; cin >> a; while(cin >> m >> n) { if(m % 2 == 1 && n % 2 == 1) sum = m * n + sqrt(2.0) - 1; else sum = m * n; printf("Scenario #%d:\n", i++); printf("%.2f\n\n", sum); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator