#32699: 為何是NA(10%)??求解??不能用python解嗎??


melodyshih0824 (超萌小辣椒)

學校 : 不指定學校
編號 : 204467
來源 : [218.166.54.147]
最後登入時間 :
2023-06-27 19:20:58

while True:
    try:
      a,b,c=map(int,input().split())
      total=0
      for i in range(a,c+1):
          if i%a==0 or i%b==0:
              total+=i        
      if total>26:
          s=total-26
          print(chr(s+65-1))
      else:
          print(chr(total+65-1))      
    except:
        break 

#32712: Re: 為何是NA(10%)??求解??不能用python解嗎??


cges30901 (cges30901)

學校 : 不指定學校
編號 : 30877
來源 : [39.12.66.21]
最後登入時間 :
2025-04-20 17:19:22

1.
      for i in range(a,c+1):
2.
          s=total-26


1.是從1開始不是從a開始

2.有沒有想過total可能大於52?