結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー | yumechi |
提出日時 | 2017-03-19 09:45:11 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 405 bytes |
コンパイル時間 | 551 ms |
コンパイル使用メモリ | 10,816 KB |
実行使用メモリ | 156,792 KB |
最終ジャッジ日時 | 2023-09-25 12:42:49 |
合計ジャッジ時間 | 4,894 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
8,960 KB |
testcase_01 | AC | 84 ms
12,372 KB |
testcase_02 | AC | 68 ms
10,656 KB |
testcase_03 | AC | 160 ms
17,204 KB |
testcase_04 | AC | 19 ms
8,524 KB |
testcase_05 | AC | 18 ms
8,484 KB |
testcase_06 | AC | 18 ms
8,588 KB |
testcase_07 | AC | 19 ms
8,524 KB |
testcase_08 | AC | 24 ms
8,748 KB |
testcase_09 | AC | 112 ms
13,652 KB |
testcase_10 | TLE | - |
ソースコード
from collections import defaultdict def solve(): n = int(input()) ansdict = defaultdict(lambda: True) for i in range(1, n//3+1): for j in range(i, n*2//3): t = tuple(sorted([i, j, n-i-j])) if ansdict[t]: ansdict[t] = False for ans in sorted(list(ansdict.keys())): print(" ".join(map(str, ans))) if __name__=="__main__": solve()