小编Cre*_*ons的帖子

使用单个扫描仪对象扫描多行

我是java的新手,所以如果这听起来绝对愚蠢,请不要降价

好吧如何使用单个扫描仪对象输入此内容

你好,你怎么样

欢迎来到我的世界

6 7

对于那些建议的人

scannerobj.nextInt->nextLine->nextLine->nextInt->nextInt,,,
Run Code Online (Sandbox Code Playgroud)

检查出来,它不起作用!

谢谢

java input java.util.scanner output

12
推荐指数
2
解决办法
3万
查看次数

TypeError:'NoneType'对象在函数内没有属性'__getitem__'变量值

我已将变量fiblist声明为全局变量,但它在gen10fib中获得None的值.

# Enter your code here. Read input from STDIN. Print output to STDOUT
#program to check if a number is fibonacci number

global fiblist 
fiblist=[0,1] #list to store generated fibonacci numbers

global Nlist
Nlist=[] # list for T test cases

global solnList
solnList=[] #contains the solution 1 is fibo 0 not fibo

global head
head=1 #to denote the maximum element in the list

def comparator(fiblist,x,head):


    if(head<x):


        gen10fib(fiblist) #generates the next 10 numbers of fibonacci sequence and appends them to …
Run Code Online (Sandbox Code Playgroud)

python runtime-error nonetype

-2
推荐指数
1
解决办法
539
查看次数