Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
using namespace std; int main(){ int b1,b2,b3,m,x,y,z,min=200000000,a1,a2,a3; cin>>b1>>b2>>b3>>m; for(x=0;x<=m;x++){ for(y=0;y<=m;y++){ int kupeno = x * b1 + y * b2; if(kupeno > m) continue; z = m - kupeno; z /= b3; int vkupno = x * b1 + y * b2 + z * b3; if(vkupno <= m and m - vkupno < min) { min = m - vkupno; a1 = x; a2 = y; a3 = z; } } } cout<
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)