【題解】AtCoder Panasonic 2020 B – Bishop

【題目敘述】https://atcoder.jp/contests/panasonic2020/tasks/panasonic2020_b

#include <bits/stdc++.h>
using namespace std;
 
long long n, m, ans;
 
int main(){
    cin >> n >> m;
    if (n == 1 || m == 1) ans = 1;
    else ans = (n*m+1)/2;
    cout << ans << "\n";
}
分享本文 Share with friends