結果
| 問題 |
No.522 Make Test Cases(テストケースを作る)
|
| ユーザー |
|
| 提出日時 | 2017-03-19 09:49:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 869 ms / 2,000 ms |
| コード長 | 445 bytes |
| コンパイル時間 | 133 ms |
| コンパイル使用メモリ | 82,300 KB |
| 実行使用メモリ | 305,136 KB |
| 最終ジャッジ日時 | 2024-07-18 10:06:56 |
| 合計ジャッジ時間 | 3,445 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
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):
if j > n-i-j:
break
t = tuple([i, j, n-i-j])
if ansdict[t]:
ansdict[t] = False
print("\n".join([" ".join(map(str, elem)) for elem in sorted(ansdict.keys())]))
if __name__=="__main__":
solve()