답안 #72201

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72201 2018-08-26T05:55:44 Z 신딩없는 신딩팀(#2212, willi19, andy627, maruii) 코코넛 젤리 음료수 (FXCUP3_nectar) C++17
15 / 100
21 ms 636 KB
#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;
}

Compilation message

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);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 428 KB Output is correct
4 Correct 4 ms 488 KB Output is correct
5 Correct 3 ms 572 KB Output is correct
6 Correct 3 ms 572 KB Output is correct
7 Correct 11 ms 588 KB Output is correct
8 Correct 18 ms 620 KB Output is correct
9 Correct 21 ms 620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 428 KB Output is correct
4 Correct 4 ms 488 KB Output is correct
5 Correct 3 ms 572 KB Output is correct
6 Correct 3 ms 572 KB Output is correct
7 Correct 11 ms 588 KB Output is correct
8 Correct 18 ms 620 KB Output is correct
9 Correct 21 ms 620 KB Output is correct
10 Runtime error 3 ms 636 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Halted 0 ms 0 KB -