#46115: Python 測資有問題


SSYang (SS)


-
ValueError                                Traceback (most recent call last)
<ipython-input-32-92815b6861c8> in <cell line: 0>()
----> 1 a,b,c=map(int, input().split())
      2 
      3 no=True
      4 if bool(a & b) == c: print("AND");no=False
      5 if bool(a | b) == c: print("OR") ;no=False

ValueError: invalid literal for int() with base 10: '範例一:'
#46119: Re: Python 測資有問題


leeguanhan0909@gmail.com (李冠翰)


-
ValueError                                Traceback (most recent call last)
 in ()
----> 1 a,b,c=map(int, input().split())
      2 
      3 no=True
      4 if bool(a & b) == c: print("AND");no=False
      5 if bool(a | b) == c: print("OR") ;no=False

ValueError: invalid literal for int() with base 10: '範例一:'

測試執行可以自己更改

實際送出不會有多餘的其他字