杭电子科技大学_god ls a girl神翻译

杭电子科技大学_god ls a girl神翻译godisagirlTimeLimit:2000/1000MS(Java/Others)    MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1337    AcceptedSubmission(s):618ProblemDescriptionOneday,whenIwa

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

god is a girl

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1337    Accepted Submission(s): 618

Problem Description
One day,when I was dreaming,god went into my dream,she was pretty cute,just like /^_^\…

I really wanted to talked to her,but my English was so poor and she was not a national god but a foreign one…After thirty minutes,she flew away…but story was not finished here,she had left a letter for me!!!What puzzled me so much is the letter was encoded.I had thought for many days,but still can’t get it. Now I turn to you for help,with some limited prompts,can you help me to decode the whole letter?

Prompts:

GDJIJ,EL SSJT UT YWOSQNIVZMI. -> HELLO,MY NAME IS LINDAINVERS.

CN WLP JRVMFGQ BVR,IJCFI? -> DO YOU REQUIRE AID,HUMAN?

NMAB VYNNF, FI’E VC HP IXJ ZLQZI. -> ONCE AGAIN, IT’S UP TO THE ELVES.



 

Input
There is multy cases,please process to EOF.

Each case is one line of string with uppercase letters and white spaces and other symbols.

 

Output
One line of the decoded string.
 

Sample Input
  
  
  
SGC CGGJX GC BMHVQ BGU BCIHNYNBX GNPLV!
 

Sample Output
  
  
  
THE FLOWS OF MAGIC ARE WHIMSICAL TODAY!
 

Author
Teddy
 

Source
 

Recommend
lcy   |   We have carefully selected several similar problems for you:  
2673 
2668 
2669 
2671 
2670 
 
#include<stdio.h>
#include<string.h>
int main()
{
	char str1[100000],str2[100000];
	int a[100000],i,t,j;
	memset(str1,0,sizeof(str1));
	while(gets(str1))
	{
     	memset(a,0,sizeof(a));         清零应放在while内
	memset(str2,0,sizeof(str2));
	t=strlen(str1);
	a[0]=1;
	a[1]=1;
	for(i=2;i<t;i++)
	  {
	  a[i]=a[i-1]+a[i-2];
    	while(a[i]>26)
	  a[i]-=26;
      }
     for(i=0,j=0;i<t;i++)
	 {
	 	if(str1[i]>='A'&&str1[i]<='Z')
	 	{
	 	str2[i]=str1[i]+a[j++];
	    if(str2[i]>'Z')
	 	str2[i]-=26;
	    }
	    else
	    str2[i]=str1[i];
		 }	
		 puts(str2);
      }
      return 0;
  }
<pre name="code" class="html">#include<stdio.h>
#include<string.h>
int main()
{
	char str1[100000] ;
	int a[100000],i,t,j;
	while(gets(str1))
	{
	t=strlen(str1);
	a[0]=1;
	a[1]=1;
	for(i=2;i<t;i++)
	  {
	  a[i]=a[i-1]+a[i-2];
    	while(a[i]>26)
	  a[i]-=26;
      }
     for(i=0,j=0;i<t;i++)
	 {
	 	if(str1[i]>='A'&&str1[i]<='Z')
	 	{
	 	str1[i]+=a[j++];
	    if(str1[i]>'Z')
	 	str1[i]-=26;
	    }
		 }	
		 puts(str1);
      }
      return 0;
  }



 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/184519.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • c中截取字符串(java字符串replace用法)

    C几种截取字符串的方法(splitSubstringReplaceremove)

    2022年4月18日
    40
  • python2 nonlocal_python中false是什么意思

    python2 nonlocal_python中false是什么意思在这篇文章中介绍了“Python的闭包与nonlocal”的用法,因为nonlocal是在Python3.0中新增的关键字,python2.x不提供支持,文中提出在Python2.x解决嵌套函数引用外部变量的方法只有使用global关键字定义全局变量,另一种可行的解决方案是使用列表或字典代替要操作的关键字。示例如下:1.python3.0使用nonlocal关键字>>>de…

    2025年9月18日
    7
  • 数据挖掘应用实例(db2聚合函数)

    http://blog.csdn.net/pipisorry/article/details/48894977海量数据挖掘MiningMassiveDatasets(MMDs)-JureLeskovec courses学习笔记之associationrules关联规则与频繁项集挖掘{FrequentItemsets:Oftencalled”association

    2022年4月15日
    35
  • SqlSessionTemplate探究

    SqlSessionTemplate探究问题就是:无论是多个dao使用一个SqlSessionTemplate,还是一个dao使用一个SqlSessionTemplate,SqlSessionTemplate都是对应一个sqlSession,当多个web线程调用同一个dao时,它们使用的是同一个SqlSessionTemplate,也就是同一个SqlSession,如何保证线程安全,关键就在于代理:(1)首先,通过如下代码创建代理类

    2022年5月31日
    47
  • Linux下如何挂载磁盘[通俗易懂]

    Linux下如何挂载磁盘[通俗易懂]使用虚拟机时发现磁盘空间不够了,需要挂载一个磁盘以供继续使用,但是磁盘不是添加就可以使用的,还需要进行挂载。一、添加磁盘添加加新硬盘重启服务器添加完之后就可以重启机器了,如果你机器是开启的,进入系统并不能看见你刚添加的那块磁盘,只有等系统重启,重新加载之后才会显示安装的那块磁盘二、进入系统使用root用户进入系统三、查看硬盘信息[root@localhost~]#fdi

    2022年6月19日
    37
  • Elasticsearch系列——关闭Elasticsearch进程,并重新启动「建议收藏」

    Elasticsearch系列——关闭Elasticsearch进程,并重新启动「建议收藏」前言有一种情况,当我们启动elasticsearch之后,经过很长一段时间没有操作,自己已经忘了是否已经启动了elasticsearch,这时候我们可以通过下面的方式验证是否启动,并重新启动:step1查找ES进程号ps-ef|grepelastic注意:下面的那个进程是当前这条命令的,不是真正的elasticsearch进程step2杀掉ES进程…

    2022年6月3日
    99

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号