- 博客(13)
- 收藏
- 关注
转载 03-小猪佩奇
import turtle as tt.pensize(4)#设置画笔宽度#t.hideturtle()#隐藏画笔t.colormode(255)#颜色模式设为rgb模式t.speed(10)#设置画笔速度t.home()#初始化画笔位置(原点)、方向(东)def draw_nose(): t.color((255, 155, 192), "...
2019-09-01 22:27:00 202
转载 02-转圈圈
size=7#创建一个size*size的二维列表array=[[0]*size]for i in range(size-1): array+=[[0]*size]#orient 代表转圈方向#0代表向下,1代表向右,2代表向左,3代表向上orient=0#i控制行索引,j控制列索引i=j=0#k为需要存入二维数组的数for num ...
2019-08-15 11:28:00 143
转载 01-数字转人民币读法
han_list=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"]unit_list=["拾","佰","仟"]#把整数部分和小数部分转化为字符串,并存入元组作为返回值def devide(num): integer=int(num)#整数部分 fraction=round((num-integer)*100)#小数部...
2019-08-14 13:35:00 278
转载 词组缩写
#include<iostream>#include<sstream>#include<queue>using namespace std;int main(){ const int max = 1000000; char str[max]; char num[max / 10]; stringstream ss...
2019-08-05 13:13:00 445
转载 字符串区间比较
#include<iostream>using namespace std;int main(){ int i, j,n; string s1, s2,a1,a2; cin >> i >> j; cin >> s1 >> s2; a1 = s1[i-1]; a2 = s2[i-1]; ...
2019-08-05 13:12:00 286
转载 字符串读入
#include<iostream>using namespace std;int main(){ char str[30]; cin.getline(str, 30); cout << str << endl; return 0;} 转载于:https://www.cnblogs.com/z...
2019-08-05 13:12:00 72
转载 回文数判断
#include<iostream>using namespace std;void is_HuiWenShu(int c){ int n = 0; int m = c; while (m != 0) { n = n * 10 + m%10; m = m / 10; } if (n == c) cout <&...
2019-08-05 13:11:00 74
转载 字符串加密
#include<iostream>using namespace std;int main(){ int i, len,n; string s; cin >>n>> s; len = s.length(); for (i = 0; i < len; i++) { if (s[i] >= 'A'...
2019-08-05 13:10:00 82
转载 字母统计
#include <iostream>#include <vector>using namespace std;int main() { string s; cin >> s; vector<int> v(52, 0); for (int i = 0; i < s.length(); i++) { ...
2019-08-05 13:09:00 59
转载 互质的数
#include<iostream>#include<string>using namespace std;int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a % b);}int main(){...
2019-08-05 13:06:00 111
转载 求每一位数和
#include <iostream>#include <stack>using namespace std;int main(){ int r,n,ans=0; stack<int>s; cin>>n>>r; while(n) { s.pu...
2019-08-05 13:04:00 107
转载 10进制转化为m进制
#include <iostream>#include <stack>using namespace std;int main(){ int r, n; stack<int>s; cin >> n >> r; while (n) { s.push(n % ...
2019-08-05 13:02:00 145
转载 m进制转化为10进制
#include<iostream>using namespace std;int main(){ string n; int m, len, i, ans = 0; cin >> n >> m; len = n.length(); for (i = 0; i < len; i++) ...
2019-08-05 12:59:00 233
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人