sdnu1219.sign up problem
来源:互联网 发布:.io域名 编辑:程序博客网 时间:2024/06/03 17:05
sdnu1219.sign up problem
Time Limit: 1000 MS Memory Limit: 131072 KB
Total Submission(s): 88 Accepted Submission(s): 68
Description
要将”China”译成密码,译码规律是:用原来字母后面的第4个字母代替原来的字母.例如,字母”A”后面第4个字母是”E”.”E”代替”A”。因此,”China”应译为”Glmre”。请编一程序,用赋初值的方法使cl、c2、c3、c4、c5五个变量的值分别为,’C’、’h’、’i’、’n’、’a’,经过运算,使c1、c2、c3、c4、c5分别变为’G’、’l’、’m’、’r’、’e’,并输出。
Input
China
Output
加密后的China
Sample Input
China
Sample Output
Glmre
Hint
so easy
Source
Unknown
Time Limit: 1000 MS Memory Limit: 131072 KB
Total Submission(s): 88 Accepted Submission(s): 68
Description
要将”China”译成密码,译码规律是:用原来字母后面的第4个字母代替原来的字母.例如,字母”A”后面第4个字母是”E”.”E”代替”A”。因此,”China”应译为”Glmre”。请编一程序,用赋初值的方法使cl、c2、c3、c4、c5五个变量的值分别为,’C’、’h’、’i’、’n’、’a’,经过运算,使c1、c2、c3、c4、c5分别变为’G’、’l’、’m’、’r’、’e’,并输出。
Input
China
Output
加密后的China
Sample Input
China
Sample Output
Glmre
Hint
so easy
Source
Unknown
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>#include<string>#include<cmath>#define N 201using namespace std;int main(){ char s[10010]; int i,m; while(scanf("%s", s)!=EOF) { m=strlen(s); for(i=0; i<m; i++){ s[i]=s[i]+4; if(s[i]>'Z'&&s[i]<'a'||s[i]>'z') s[i]-=26; //printf(" %c",s[i]); } printf("%s\n", s); } return 0;}
- sdnu1219.sign up problem
- Sign in | Sign out | Sign up
- SIGN UP BEC2
- github上的sign in;sign up
- Sign Up for the Android Maps API
- 12Bet Malaysia Online Sign Up Bonus
- Warm-Up-Problem
- Atlassian FAQ - JIRA Confluence Crowd Bamboo Log In | Sign Up
- UVa Problem Solution: 10205 - Stack 'em Up
- Sign Up for the Google Maps API——Google 地图 API 文档之四
- the right pose to design a security system for sign up
- Sign up Error:(1, 0) Plugin with id 'com.android.application' not found
- Sign up Error:(23, 17) Failed to resolve: junit:junit:4.12
- UVa Problem 10205 Stack ’em Up (完美洗牌术)
- Problem:Ubuntu Give up waiting for root device
- UVA 10205 Problem E: Stack 'em Up(模拟)
- up
- UP
- 计时器加(延时委托)
- Linux笔记:守护进程
- centos7安装apache http server启动失败
- HTML5头部为什么只需要写<!DOCTYPE HTML>?
- jzoj5433 【NOIP2017提高A组集训10.28】图
- sdnu1219.sign up problem
- Servlet异步处理
- 时间复杂度学习记录
- linux中自动安装虚拟机
- h5基础
- Linux程序设计---chown命令的简单实现
- hdu5884-二分&k叉哈夫曼队列优化-Sort
- PhotoShop Q&A
- Selenium特点