제출 #72201

#제출 시각아이디문제언어결과실행 시간메모리
72201신딩없는 신딩팀 (#118)Nectar with Coconut Jelly (FXCUP3_nectar)C++17
15 / 100
21 ms636 KiB
#include <stdio.h>
#include <algorithm>
using namespace std;

int cnt[1111];

int main(){
    int n,j,r,t;

    scanf("%d %d %d %d",&n,&j,&r,&t);

    for(int i=1;i<=n;i++) cnt[i]=j;
    while(t--){
        for(int i=n-1;i>=1;i--){
            cnt[i+1]+=(cnt[i]+r-1)/r;
            cnt[i]-=(cnt[i]+r-1)/r;
        }
    }

    for(int i=1;i<=n;i++) printf("%d\n",cnt[i]);

    return 0;
}

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

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