답안 #642401

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
642401 2022-09-19T11:02:21 Z cigneve Roses (BOI20_roses) C++14
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
  long long N,A,B,C,D;
  cin >> N >> A >> B >> C >> D;
  long long ret=INT_MAX;
  for(long long n1=0;n1<=ceil(N/A);n1++){
    long long n2=ceil(((double)(N-n1*A))/C);
    ret=min(ret,n1*B+n2*D);
  }
  printf("%lld\n",ret);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Incorrect 0 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Incorrect 0 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -