排序:
默认
按更新时间
按访问量

数字以任意进制转换成字符串----itoa的实现

    这几天需要把一个int型整数转换成指定进制的字符串,在windows下通过itoa实现了这个需求,然后发现在linux下没有这个函数,然后网上都说可以通过sprintf等来实现转换,但是还是不能实现itoa的任意进制转换功能,想看一下itoa的源代码吧,也搜不到,只好参考别人的写法,自己实...

2018-05-22 19:04:49

阅读数:42

评论数:0

USACO----Combination Lock

Farmer John's cows keep escaping from his farm and causing mischief. To try and prevent them from leaving, he purchases a fancy combination lock to k...

2018-04-09 21:03:00

阅读数:30

评论数:0

USACO----Barn Repair

It was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation...

2018-03-19 17:33:14

阅读数:32

评论数:0

USACO----Mixing Milk

The Merry Milk Makers company buys milk from farmers, packages it into attractive 1- and 2-Unit bottles, and then sells that milk to grocery stores s...

2018-03-19 16:48:53

阅读数:42

评论数:0

USACO----Palindromic Squares

Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.Given a number base B (2 <= B &...

2018-03-19 16:46:41

阅读数:32

评论数:0

USACO----Name That Number

Among the large Wisconsin cattle ranchers, it is customary to brand cows with serial numbers to please the Accounting Department. The cow hands don't...

2018-03-19 16:45:06

阅读数:37

评论数:0

USACO----Transformations

A square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a ...

2018-03-19 16:43:24

阅读数:22

评论数:0

USACO----Milking Cows

Three farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in se...

2018-03-19 16:41:38

阅读数:138

评论数:0

USACO----Friday the Thirteenth

Is Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answ...

2018-03-19 16:39:42

阅读数:30

评论数:0

USACO----Greedy Gift Givers

A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money t...

2018-03-19 16:38:12

阅读数:34

评论数:1

USACO----Your Ride Is Here

It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, t...

2018-03-19 16:31:49

阅读数:21

评论数:0

查看支持球队一周比赛安排的python脚本

# -*- coding: utf-8 -*- import urllib.request import random import re import datetime from bs4 import BeautifulSoup url = "http://www.don...

2018-03-13 14:31:49

阅读数:47

评论数:0

由localtime引发的函数可重入问题

原文地址: http://blog.csdn.net/cuishumao/article/details/10162603 CSDN为什么没有转载功能呢??? 一、先看一个例子 [html] view plain copy ...

2017-12-07 10:34:57

阅读数:77

评论数:0

批处理查找并复制文件到指定文件夹

如何通过批处理,在一个目录及其子目录中查找指定列表中的所有文件,并把这些文件复制到指定的文件夹中呢?下面这个批处理可堪一用:

2017-05-07 00:07:06

阅读数:4541

评论数:2

以指定分隔符分割字符串存储到vector中

示例: 8:00起售车站:北京西、南京、南京南、同江

2016-12-24 23:29:17

阅读数:1787

评论数:0

fstream类读取UTF-8、Unicode和ANSI文本文档乱码问题的解决方案

原文链接:https://my.oschina.net/duluo180/blog/17457 1、解决UTF-8类型的文本文档中文乱码读取(思路:将UTF-8转成Unicode然后再转ANSI) #include #include #include // #include #incl...

2016-12-19 16:40:47

阅读数:4426

评论数:0

查看喜爱球队一周比赛安排

平时上班比较忙,经常错过支持的球队的比赛,所以能够知道支持的球队本周都有哪些比赛将会是一个不错的选择,于是自己动手实现了这个想法。初学Python,练习的缘故,部分功能使用python实现。总体思想就是从指定网站下载下比赛信息,然后分析之。     C++部分,主要实现文件的下载: #incl...

2016-03-13 00:09:34

阅读数:626

评论数:0

C实现两个大数相加

#include #include int main() { char snum1[1024], snum2[1024], sop1[1024]="0", sop2[1024]; int len, len1, len2, opsign = 0; pr...

2016-03-07 12:28:30

阅读数:543

评论数:0

使用Python发送带附件的邮件

做运维值班时,每天早上都要通过邮箱发送日报,最近开始学习Python,这下可以让电脑自己去发邮件了    初学Python,相关代码可能不够完善,使用的是python 3.5版本。 实际遇到最大的问题就是使用网页版邮箱时,附件是中文时会导致乱码的问题,网上查了查有好多不同的版本,经过验证...

2016-01-19 13:41:41

阅读数:588

评论数:0

能够把自动问答机制应用到运维中吗?

在游戏运维一线做了很长一段时间了,每天上班都要应付不同部门,不同的人提的各种需求,杂乱而又繁琐,有时候整天都会消耗在这些零碎的事情上,让人疲于应付。不过在做过一段时间后,慢慢发现,需要做的事情好多都是相似的,那么可不可以让计算机去自动处理这些琐碎的需求,我们只负责监督呢?甚至让需求人员直接去和计算...

2015-03-04 14:33:22

阅读数:731

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭