Submission #72201

#TimeUsernameProblemLanguageResultExecution timeMemory
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; }

Compilation message (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...