原创 pat 1020 月餅 (25)

1020 月餅 (25) 題目要求 作者 單位 時間限制 內存限制 代碼長度限制 CHEN, Yue PTA聯盟 200ms 64MB 16KB 題目內容: 月餅是中國人在中秋佳節時吃的一種傳統食品,不同地區有許多不同風味

原创 pat 1018 錘子剪刀布 (20)

1018 錘子剪刀布 (20) 題目要求 作者 單位 時間限制 內存限制 代碼長度限制 CHEN, Yue PTA聯盟 200ms 64MB 16KB 題目內容: 大家應該都會玩“錘子剪刀布”的遊戲:兩人同時給出手勢,勝負

原创 cs:app學習筆記(1):show-bytes

showbytes 代碼總覽 代碼說明 編譯與結果顯示 show—bytes 代碼總覽 #include <stdio.h> typedef unsigned char* byte_pointer; void show_b

原创 閏年問題(C++面向對象初步)

代碼 dateh datecpp maincpp 編譯命令 代碼 date.h // date.h #ifndef __DATE_H__ #define __DATE_H__ #include <iostream> usin

原创 pat 1016 部分A+B (15)

pat 1016 部分A+B (15) 題目要求 作者 單位 時間限制 內存限制 代碼長度限制 CHEN, Yue PTA聯盟 200ms 64MB 16KB 題目內容: 正整數A的“D~A~(爲1位整數)部分”定義爲由A

原创 python Matplotlib 畫心形線(極座標 直角座標參數方程)

1.極座標 # -*- coding:utf8 -*- # __author__ = 'wangxuhao' # __file__ = 'Cardioid_polar' import numpy as np import matplo

原创 python Matplotlib 學習筆記(2)

主要內容摘抄自 https://zhuanlan.zhihu.com/p/24309547 感謝大大。 # -*- coding: utf-8 -*- # __author__ = 'wangxuhao' import numpy as

原创 python numpy 學習筆記(10)

1.矩陣的相關操作 求逆,求解線性方程組,求解特徵值,求解特徵向量,奇異值分解# -*- coding:utf-8 -*- from numpy import * A = mat("0 1 2; 1 0 3; 4 -3 8") inve

原创 python Matplotlib 學習筆記(1)

1.繪製簡單曲線 import numpy as np import sys import matplotlib.pyplot as plt func = np.poly1d(np.array([1, 2, 3, 4]).astype