結果

問題 No.933 おまわりさんこいつです
ユーザー uni_pythonuni_python
提出日時 2020-10-15 23:16:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 485 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 92,080 KB
最終ジャッジ日時 2023-09-28 01:29:10
合計ジャッジ時間 3,876 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,312 KB
testcase_01 AC 63 ms
70,992 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 63 ms
71,152 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 68 ms
76,276 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 63 ms
71,272 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 61 ms
71,368 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 105 ms
92,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    P=LI()
    
    def ch(x):
        temp=0
        while x!=0:
            temp+=x%10
            x=x//10
        return temp
    
    ans=0
    for i in range(N):
        P[i]=ch(P[i])
        ans+=P[i]
        
    while ans>=10:
        ans=ch(ans)
        
    print(ans)




main()
0