#55544: C++ 解答


yp11550228@yphs.tp.edu.tw (705-30梁碩恩)


#include <iostream>

     using namespace std;

     int main() {
         //輸入L,W,H,K
         int L,W,H,K;
         cin >> L >> W >> H >> K;

if(L % K !=0){
                cout << 0;
         } else if(W % K !=0){
                cout << 0;
         } else if(H % K !=0){
                cout << 0;
         } else {
             cout << (L / K) * (W / K) * (H / K);
         }
        return 0;
        }