結果

問題 No.933 おまわりさんこいつです
ユーザー 双六双六
提出日時 2020-07-27 23:06:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 481 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,752 KB
実行使用メモリ 93,952 KB
最終ジャッジ日時 2023-09-11 06:06:13
合計ジャッジ時間 4,708 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,388 KB
testcase_01 AC 94 ms
71,616 KB
testcase_02 AC 94 ms
71,616 KB
testcase_03 AC 94 ms
71,760 KB
testcase_04 AC 95 ms
71,472 KB
testcase_05 AC 95 ms
71,608 KB
testcase_06 AC 95 ms
71,656 KB
testcase_07 AC 95 ms
71,628 KB
testcase_08 AC 97 ms
71,632 KB
testcase_09 AC 97 ms
71,624 KB
testcase_10 AC 96 ms
71,256 KB
testcase_11 AC 105 ms
76,836 KB
testcase_12 AC 109 ms
76,772 KB
testcase_13 AC 124 ms
77,736 KB
testcase_14 AC 128 ms
77,972 KB
testcase_15 AC 131 ms
78,492 KB
testcase_16 AC 152 ms
81,728 KB
testcase_17 AC 187 ms
89,952 KB
testcase_18 AC 95 ms
71,636 KB
testcase_19 AC 203 ms
93,688 KB
testcase_20 AC 187 ms
93,284 KB
testcase_21 AC 94 ms
71,452 KB
testcase_22 AC 94 ms
71,696 KB
testcase_23 AC 250 ms
93,952 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def root(N):
	val = sum(list(map(int, list(str(N)))))
	if val % 9 != 0:
		return val % 9
	else:
		return val

#処理内容
def main():
	N = int(input())
	P = getlist()
	ans = 1
	for i in P:
		ans *= root(i)
		ans = root(ans)

	print(ans)


if __name__ == '__main__':
	main()
0