UVA 12554 - A Special "Happy Birthday" Song!!! UVA • Aug 31, 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define Pi 2*acos(0.0) using namespace std; int main() { int n,p; char s[100][100]; char c[16][100]={"Happy","birthday","to","you","Happy","birthday", "to","you","Happy","birthday","to","Rujia","Happy","birthday","to","you"}; while(sc("%d",&n)==1) { int k=0,p=1; for(int i=0;i16) p=ceil(n/16)+1; for(int j=0,i=0;j<16*p;j++,i++,k++) { if(i==n) i=0; if(j==16) k=0; pf("%s: %s\n",s[i],c[k]); } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12554/12554.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read