結果
問題 | No.1081 和の和 |
ユーザー |
![]() |
提出日時 | 2020-06-20 21:49:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 284 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-03 17:34:17 |
合計ジャッジ時間 | 907 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 8 |
ソースコード
n = int(input()) A = list(map(int,input().split())) ans = 0 if [str(i) for i in A].count(str(A[0])) == n: ans = A[0]*2**(n-1) else: for i in range(n): if i == 0 or i == n-1: ans += A[i] else: ans += A[i]*(n-1) print(ans%(10**9+7))