結果

問題 No.1041 直線大学
ユーザー splash9494splash9494
提出日時 2020-05-02 00:49:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-08-26 18:43:46
合計ジャッジ時間 5,123 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,096 KB
testcase_01 AC 71 ms
71,232 KB
testcase_02 AC 72 ms
71,140 KB
testcase_03 AC 71 ms
71,184 KB
testcase_04 AC 72 ms
70,892 KB
testcase_05 AC 73 ms
71,156 KB
testcase_06 AC 73 ms
71,380 KB
testcase_07 AC 73 ms
71,096 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 74 ms
71,368 KB
testcase_11 AC 71 ms
71,040 KB
testcase_12 AC 73 ms
71,192 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 73 ms
71,124 KB
testcase_21 WA -
testcase_22 AC 71 ms
71,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 73 ms
71,140 KB
testcase_29 AC 73 ms
71,192 KB
testcase_30 AC 73 ms
70,900 KB
testcase_31 AC 73 ms
71,120 KB
testcase_32 AC 73 ms
71,296 KB
testcase_33 AC 74 ms
71,088 KB
testcase_34 AC 78 ms
70,980 KB
testcase_35 AC 74 ms
71,196 KB
testcase_36 AC 73 ms
71,096 KB
testcase_37 AC 73 ms
71,120 KB
testcase_38 AC 74 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline

N = int(input())

ps = []
for _ in range(N):
    ps.append(tuple(map(int, input().split())))

cnt = 2

for p in ps[2:]:
    if (ps[1][1] - ps[0][1])*(ps[1][0] - p[0]) == (ps[1][1] - p[1])*(ps[1][0] - ps[0][0]):
        cnt += 1
print(cnt)
0