Олимпиадный тренинг

Задача . 14


Задача

Темы:
One of the rules for converting English to Pig Latin states: If a word begins with a consonant, move the consonant to the end of the word and add “ay”. Thus
“dog” becomes “ogday,” and “crisp” becomes “rispcay”. Suppose s is a String containing an English word that begins with a consonant. Which of the following
creates the correct corresponding word in Pig Latin? Assume the declarations
String ayString = "ay";
String pigString;

(A) pigString = s.Substring(0, s.Length) + s.Substring(0,1) + ayString;
(B) pigString = s.Substring(1, s.Length) + s.Substring(0,0) + ayString;
(C) pigString = s.Substring(0, s.Length-1) + s.Substring(0,1) + ayString;
(D) pigString = s.Substring(1, s.Length-1) + s.Substring(0,0) + ayString;
(E) pigString = s.Substring(1, s.Length) + s.Substring(0,1) + ayString;

time 1000 ms
memory 32 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
Комментарий учителя