Solutions/Mr.K's Solution
PKU 3364. Black and white painting. [판정:AC]
Milkskin
2011. 4. 14. 22:33
사뿐하게 AC
어려운 문제인줄 알았는데 아니었구만 :)
#includeusing namespace std; int main() { int n, m, c; int temp; cin >> n >> m >> c; while( (n != 0) || (m != 0) || (c != 0) ) { temp = (n - 7) * (m - 7); if( (temp % 2 == 1) && (c == 1) ) { cout << temp / 2 + c << endl; } else { cout << temp / 2 << endl; } cin >> n >> m >> c; } return 0; }