結果

問題 No.1447 Greedy MtSaka
ユーザー KudeKude
提出日時 2021-03-31 14:10:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 71,592 KB
最終ジャッジ日時 2023-08-21 08:48:55
合計ジャッジ時間 3,136 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,092 KB
testcase_01 AC 68 ms
71,216 KB
testcase_02 AC 69 ms
71,288 KB
testcase_03 AC 70 ms
71,216 KB
testcase_04 AC 68 ms
71,208 KB
testcase_05 AC 71 ms
71,456 KB
testcase_06 AC 69 ms
71,544 KB
testcase_07 AC 68 ms
71,208 KB
testcase_08 AC 69 ms
71,096 KB
testcase_09 AC 68 ms
71,388 KB
testcase_10 AC 72 ms
71,224 KB
testcase_11 AC 70 ms
71,236 KB
testcase_12 AC 68 ms
71,456 KB
testcase_13 AC 69 ms
71,472 KB
testcase_14 AC 68 ms
71,248 KB
testcase_15 AC 69 ms
71,240 KB
testcase_16 AC 70 ms
71,396 KB
testcase_17 AC 68 ms
71,316 KB
testcase_18 AC 70 ms
71,096 KB
testcase_19 AC 69 ms
71,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ps = [tuple(map(int, input().split())) for _ in range(n)]
ps.append(ps[0])
ans = 0
for (a, b), (c, d) in zip(ps, ps[1:]):
    ans += a * d - b * c
print(ans)
0