Input
Input is not used.
Output
The output must contain an introspective PIBAS program.
Problem Source: 2002-2003 ACM Central Region of Russia Quarterfinal Programming Contest, Rybinsk, October 2002
It would be unfair to demand writing an introspective program in a language known to a different degree by different participants. Therefore we describe a formal syntax for a new language called PIBAS. And your task is to write a program that writes an introspective PIBAS program to the output.
Testing this PIBAS program includes a syntax check and a test run. A program is considered correct if it outputs a string equal to its source code.
PIBAS description:
A PIBAS program consists of one or more operators separated with ";" (semicolon). A program is written in one line that is no longer than 32000 characters.
Two types of operators exist: string assignment operator and output operator.
Assignment operator is used as follows: =
String variable is denoted with a single capital Latin letter.
String expression is either a string variable, or a string constant, or a substring function, or a concatenation of string expressions with the use of "+" (plus) character.
String constant is a sequence of any printable characters enclosed in double (") or single (') quotes. This sequence cannot contain the quote character it is enclosed in. Examples: 'Rybinsk', "O key!", "I don't know solution."
A substring function is used in the following way: $(,,). The second parameter sets the starting character of the substring and the third one sets its length. Character numeration is one-based.
Output operator: ?.
The total length of all strings sent to output may not exceed 32000 characters.
InputInput is not used.OutputThe output must contain an introspective PIBAS program.Problem Source: 2002-2003 ACM Central Region of Russia Quarterfinal Programming Contest, Rybinsk, October 2002It would be unfair to demand writing an introspective program in a language known to a different degree by different participants. Therefore we describe a formal syntax for a new language called PIBAS. And your task is to write a program that writes an introspective PIBAS program to the output.Testing this PIBAS program includes a syntax check and a test run. A program is considered correct if it outputs a string equal to its source code.PIBAS description:A PIBAS program consists of one or more operators separated with ";" (semicolon). A program is written in one line that is no longer than 32000 characters.Two types of operators exist: string assignment operator and output operator.Assignment operator is used as follows: =String variable is denoted with a single capital Latin letter.String expression is either a string variable, or a string constant, or a substring function, or a concatenation of string expressions with the use of "+" (plus) character.String constant is a sequence of any printable characters enclosed in double (") or single (') quotes. This sequence cannot contain the quote character it is enclosed in. Examples: 'Rybinsk', "O key!", "I don't know solution."A substring function is used in the following way: $(,,). The second parameter sets the starting character of the substring and the third one sets its length. Character numeration is one-based.Output operator: ?.The total length of all strings sent to output may not exceed 32000 characters.
การแปล กรุณารอสักครู่..
ข้อมูลเข้าไม่ได้ใช้ผลผลิตการแสดงผลจะต้องมีโปรแกรมครุ่นคิด pibas .แหล่งที่มาของปัญหา : 2545-2546 ภาคกลางของรัสเซีย โดยโปรแกรมการแข่งขันรอบก่อนสุดท้ายการประกวด Rybinsk , ตุลาคม 2545มันก็ไม่ยุติธรรมกับความต้องการเขียนโปรแกรมครุ่นคิดในภาษาที่รู้จักในระดับที่แตกต่างกัน โดยผู้เข้าร่วมที่แตกต่างกัน ดังนั้นเราจึงอธิบายไวยากรณ์อย่างเป็นทางการสำหรับภาษาใหม่ที่เรียกว่า pibas . และงานของคุณคือการ เขียนโปรแกรมเขียนโปรแกรม pibas ครุ่นคิดเพื่อการส่งออกทดสอบโปรแกรม pibas นี้รวมถึงการตรวจสอบไวยากรณ์และการทดสอบวิ่ง โปรแกรมจะถือว่าถูกต้อง ถ้ามันออกสตริงเท่ากับรหัสแหล่งที่มาของpibas รายละเอียด :โปรแกรม pibas ประกอบด้วยหนึ่งหรือมากกว่าหนึ่งผู้ประกอบการแยกทางกับ " ; " ( อักขระ ) เป็นโปรแกรมที่ถูกเขียนในหนึ่งบรรทัดที่เป็นไม่เกิน 32 , 000 ตัวอักษรสองประเภทของผู้ประกอบการที่มีอยู่ : ผู้ประกอบการมอบหมายสตริงและผู้ประกอบการส่งออกผู้ควบคุมงานจะใช้ดังนี้ < สตริง > = < นิพจน์ > ตัวแปรสตริงตัวแปรสตริงเขียนด้วยอักษรตัวใหญ่ละตินเดี่ยวนิพจน์สตริงเป็นสตริงตัวแปรหรือค่าคงที่สตริงหรือข้อความฟังก์ชันหรือนิพจน์สตริงที่เรียงต่อกัน ด้วยการใช้ " + " ( บวก ) อักขระค่าคงที่สตริงเป็นลำดับของตัวอักษรใด ๆที่พิมพ์อยู่ในคู่หรือเดี่ยว ( " ) ( " ) ราคา ลำดับนี้จะประกอบด้วยคำพูดตัวละครมันอยู่ใน ตัวอย่าง : Rybinsk " , " โอ คีย์ ! ! " " ไม่รู้สิ โซลูชั่น " .ข้อความฟังก์ชันใช้ในวิธีต่อไปนี้ : $ ( < string ตัวแปรจำนวนเต็มไม่ได้ลงนาม > , < > , < / จำนวนเต็ม > ) พารามิเตอร์ตัวที่สองชุดตัวอักษรเริ่มต้นของข้อความ และหนึ่งในสามชุดความยาว ตัวเลขตัวหนึ่งตามพนักงานออก ? < สายการแสดงออก >ความยาวทั้งหมดของข้อความทั้งหมดส่งให้ผลผลิตอาจไม่เกิน 32 , 000 ตัวอักษร
การแปล กรุณารอสักครู่..