제출 #209520

#제출 시각아이디문제언어결과실행 시간메모리
209520model_codeKnapsack (NOI18_knapsack)C++17
12 / 100
5 ms256 KiB
#include <bits/stdc++.h>
using namespace std;
long long s,n,w,v,k;
int main(){
	scanf("%lld %lld",&s,&n);
	scanf("%lld %lld %lld",&v,&w,&k);
	printf("%lld\n",v*min(k,s/w));
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

knapsack.cpp: In function 'int main()':
knapsack.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&s,&n);
  ~~~~~^~~~~~~~~~~~~~~~~~~
knapsack.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld %lld",&v,&w,&k);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...