UVa 11946-code Number

Source: Internet
Author: User

Title: Two children write to let parents pass, in order not to let parents read the contents of the letter, the contents of the letter encrypted,

Please decrypt the encrypted message.

Analysis: string, Number theory. Only 10 letters are chosen to be called 0~9 mappings, which can be converted directly.

Description: ╮(╯▽╰)╭ UVA again cannot open the ╮(╯▽╰)╭.

#include <cstdlib> #include <cstring> #include <cstdio> #include <cmath>char buf[81];char map[ = "OIZEASGTBP"; int main () {int t;while (~scanf ("%d", &t) {GetChar (); while (T-) {while (gets (BUF) && buf[0 ] {for (int i = 0; buf[i]; + + i) if (Buf[i] >= ' 0 ' && buf[i] <= ' 9 ') buf[i] = map[buf[i]-' 0 '];p UTS (BUF);} if (T) printf ("\ n");}}    return 0;}


UVa 11946-code Number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.