本文主要是介绍2018刑侦推理试题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
今天闺蜜发了一个刑侦科推理试题,我看了两下就想编程爆破,可怕,我竟然丧失了推理能力吗!!!
既然已经编程求解了,我就先把代码粘上来吧,然后我现在尝试自己去推一下,要是推出来我会补上推理过程的。
# -*- coding:utf-8 -*-
s = "ABCD"
def test(str):if(str[4]=='C' and str[1]=='A') or (str[4]=='D' and str[1]=='B') or (str[4]=='A' and str[1]=='C') or ((str[4]=='B' and str[1]=='D')):if(str[2]=='A' and str[5]==str[1] and str[3]==str[1] and str[1]!='A') or(str[2]=='D' and str[5]==str[1] and str[1]=='D' and str[3]!='D') or(str[2]=='C' and str[5]==str[3] and str[3]=='C' and str[1]!='C') or(str[2]=='B' and str[1]==str[3] and str[3]=='B' and str[5]!='B'):if(str[3]=='A' and str[
这篇关于2018刑侦推理试题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!