結果
| 問題 |
No.1109 調の判定
|
| コンテスト | |
| ユーザー |
zaki_chemtech
|
| 提出日時 | 2020-07-13 14:53:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 424 bytes |
| コンパイル時間 | 854 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-11-07 17:13:07 |
| 合計ジャッジ時間 | 3,575 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 35 WA * 8 |
ソースコード
check = [0, 2, 4, 5, 7, 9, 11]
n=int(input())
t = list(map(int,input().split()))
flag_ans = False
for i in range(12):
flag_ok = True
for j in t:
if (i+j)%12 not in check:
flag_ok = False
break
if flag_ok:
if flag_ans:
print(-1)
exit()
else:
flag_ans = True
ans = i
if flag_ans:
print(ans)
else:
print(-1)
zaki_chemtech