結果

問題 No.2931 Shibuya 109
ユーザー syunsuke
提出日時 2025-01-04 14:44:20
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 246 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 82,220 KB
実行使用メモリ 78,228 KB
最終ジャッジ日時 2025-01-04 14:44:28
合計ジャッジ時間 8,008 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q = map(int,input().split())
A = input()
A = A.replace(" ","")
#print(A)
for q in range(Q):
    l,r = map(int,input().split())
    n = int(A[l-1:r])
    n //=9
    n = str(n)
    ans = 0
    for i in n:
        ans += int(i)
    print(ans)
    
0