結果

問題 No.933 おまわりさんこいつです
ユーザー vwxyzvwxyz
提出日時 2021-08-12 01:35:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 842 bytes
コンパイル時間 1,110 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 98,532 KB
最終ジャッジ日時 2023-10-26 03:31:47
合計ジャッジ時間 6,481 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
88,720 KB
testcase_01 AC 147 ms
88,712 KB
testcase_02 AC 148 ms
88,708 KB
testcase_03 AC 146 ms
88,708 KB
testcase_04 AC 147 ms
88,724 KB
testcase_05 AC 148 ms
88,716 KB
testcase_06 AC 146 ms
88,720 KB
testcase_07 AC 148 ms
88,720 KB
testcase_08 AC 147 ms
88,724 KB
testcase_09 AC 148 ms
88,720 KB
testcase_10 AC 149 ms
88,708 KB
testcase_11 AC 146 ms
88,720 KB
testcase_12 AC 150 ms
88,724 KB
testcase_13 AC 151 ms
89,428 KB
testcase_14 AC 151 ms
89,452 KB
testcase_15 AC 152 ms
89,448 KB
testcase_16 AC 153 ms
90,404 KB
testcase_17 AC 159 ms
94,096 KB
testcase_18 AC 148 ms
88,732 KB
testcase_19 AC 162 ms
95,960 KB
testcase_20 AC 161 ms
95,144 KB
testcase_21 AC 152 ms
88,744 KB
testcase_22 AC 153 ms
88,744 KB
testcase_23 AC 170 ms
98,532 KB
testcase_24 AC 168 ms
98,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
import copy
import decimal
import fractions
import functools
import heapq
import itertools
import math
import random
import sys
from collections import Counter,deque,defaultdict
from functools import lru_cache,reduce
from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max
def _heappush_max(heap,item):
    heap.append(item)
    heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappushpop_max(heap, item):
    if heap and item < heap[0]:
        item, heap[0] = heap[0], item
        heapq._siftup_max(heap, 0)
    return item
from math import gcd as GCD
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines

N=int(readline())
ans=1
for P in map(int,readline().split()):
    ans*=P
    ans%=9
    if P==0:
        ans=0
        break
else:
    if ans==0:
        ans=9
print(ans)
0