#include <iostream>
#include <string>
using namespace std;
int main(){
string song[4] = {"Happy", "birthday", "to", "you"};
string name[101];
int n;
cin >> n;
for(int i = 0; i < n; i++)cin >> name[i];
int limit = (n / 16) + 1;
limit *= 16;
for(int i = 0; i < limit; i++)
if(i % 16 == 11)cout << name[i%n] << ": Rujia" << endl;
else cout << name[i%n] << ": " << song[i%4] << endl;
return 0;
}
#include <string>
using namespace std;
int main(){
string song[4] = {"Happy", "birthday", "to", "you"};
string name[101];
int n;
cin >> n;
for(int i = 0; i < n; i++)cin >> name[i];
int limit = (n / 16) + 1;
limit *= 16;
for(int i = 0; i < limit; i++)
if(i % 16 == 11)cout << name[i%n] << ": Rujia" << endl;
else cout << name[i%n] << ": " << song[i%4] << endl;
return 0;
}
No comments:
Post a Comment