結果
問題 | No.933 おまわりさんこいつです |
ユーザー | vwxyz |
提出日時 | 2021-08-12 01:34:36 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 852 bytes |
コンパイル時間 | 1,404 ms |
コンパイル使用メモリ | 81,544 KB |
実行使用メモリ | 97,948 KB |
最終ジャッジ日時 | 2023-10-26 03:30:39 |
合計ジャッジ時間 | 6,157 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 146 ms
88,844 KB |
testcase_01 | AC | 150 ms
88,856 KB |
testcase_02 | WA | - |
testcase_03 | AC | 143 ms
88,852 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 151 ms
93,476 KB |
testcase_18 | AC | 145 ms
88,856 KB |
testcase_19 | AC | 151 ms
95,364 KB |
testcase_20 | AC | 160 ms
95,296 KB |
testcase_21 | AC | 144 ms
88,876 KB |
testcase_22 | AC | 144 ms
88,888 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
ソースコード
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()): P=P%9 ans*=P ans%=9 if P==0: ans=0 break else: if ans==0: ans=9 print(ans)