ABC039A - 高橋直体
問題:A - 高橋直体
#include <iostream> using namespace std; int main(void) { int a, b, c; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> c; cout << 2 * ((a * b) + (b * c) + (c * a)) << "\n"; return 0; }
直方体の表面積 = 2(ab + bc + ac)
a : 縦の長さ
b : 横の長さ
c : 高さ