結果

問題 No.1447 Greedy MtSaka
ユーザー dangodango
提出日時 2023-06-25 12:18:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 86,548 KB
実行使用メモリ 71,112 KB
最終ジャッジ日時 2023-09-15 08:42:45
合計ジャッジ時間 2,760 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,992 KB
testcase_01 AC 71 ms
70,988 KB
testcase_02 AC 73 ms
70,968 KB
testcase_03 AC 72 ms
70,928 KB
testcase_04 AC 72 ms
71,072 KB
testcase_05 AC 71 ms
70,828 KB
testcase_06 AC 72 ms
70,948 KB
testcase_07 AC 70 ms
70,716 KB
testcase_08 AC 73 ms
71,112 KB
testcase_09 AC 72 ms
71,032 KB
testcase_10 AC 71 ms
70,716 KB
testcase_11 AC 74 ms
71,096 KB
testcase_12 AC 74 ms
71,104 KB
testcase_13 AC 71 ms
70,936 KB
testcase_14 AC 72 ms
71,024 KB
testcase_15 AC 75 ms
71,108 KB
testcase_16 AC 73 ms
70,940 KB
testcase_17 AC 73 ms
71,096 KB
testcase_18 AC 71 ms
71,084 KB
testcase_19 AC 73 ms
71,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
points = [list(map(int, input().split())) for _ in range(N)]
area = 0
for i in range(N):
    x1, y1 = points[i]
    x2, y2 = points[(i + 1) % N]
    area += (x1 * y2 - x2 * y1)
print(abs(area))
0