제출 #95559

#제출 시각아이디문제언어결과실행 시간메모리
95559oolimryTarifa (COCI16_tarifa)C++14
50 / 50
2 ms380 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
    int x, n;
    scanf("%d %d",&x,&n);

    x *= (n+1);

    for(int i =0;i < n;i++){
        int a;
    scanf("%d",&a);
    x -= a;
    }
    printf("%d",x);

}

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

tarifa.cpp: In function 'int main()':
tarifa.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&x,&n);
     ~~~~~^~~~~~~~~~~~~~~
tarifa.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&a);
     ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...