Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int cc = 0;
while(a && c && d) {
cc += 256;
a--;
c--;
d--;
}
while(a && b) {
cc += 32;
a--;
b--;
}
cout << cc << endl;
return 0;
}
Copy The Code &
Try With Live Editor
Input
5 1 3 4
Output
800
Demonstration
Codeforces Solution-Anton and Digits-Solution in C, C++, Java, Python