結果

問題 No.1447 Greedy MtSaka
ユーザー 👑 H20H20
提出日時 2021-04-01 13:16:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 71,264 KB
最終ジャッジ日時 2023-08-22 16:56:02
合計ジャッジ時間 3,435 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,124 KB
testcase_01 AC 77 ms
70,896 KB
testcase_02 AC 74 ms
70,968 KB
testcase_03 AC 75 ms
71,048 KB
testcase_04 AC 75 ms
71,052 KB
testcase_05 AC 74 ms
71,052 KB
testcase_06 AC 74 ms
71,264 KB
testcase_07 AC 76 ms
70,988 KB
testcase_08 AC 74 ms
70,976 KB
testcase_09 AC 75 ms
70,972 KB
testcase_10 AC 74 ms
71,016 KB
testcase_11 AC 75 ms
70,704 KB
testcase_12 AC 74 ms
71,068 KB
testcase_13 AC 75 ms
71,168 KB
testcase_14 AC 74 ms
71,196 KB
testcase_15 AC 75 ms
70,896 KB
testcase_16 AC 75 ms
71,176 KB
testcase_17 AC 75 ms
71,076 KB
testcase_18 AC 74 ms
71,112 KB
testcase_19 AC 75 ms
70,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X =[0]*N
Y =[0]*N
S2 = 0
for i in range(N):
    X[i],Y[i]=map(int,input().split())

for i in range(1,N-1):
    S2 += abs(X[0]*Y[i] + X[i]*Y[i+1] + X[i+1]*Y[0] - Y[0]*X[i] - Y[i]*X[i+1] - Y[i+1]*X[0])

print(S2)
0