自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 C语言文件操作

一:打开文件句柄//参数1:文件路径//参数2:文件打开模式函数执行成功返回文件流指针,错误返回NULL。FILE *fopen(const char *path, const char *mode);模式 操作 区别 文件要求r 读 从文件头开始 文件需存在r+ 读写 从文件

2021-06-07 14:20:12 218

原创 PAT 1019 General Palindromic Number

PAT 1019 General Palindromic Number题目PAT 1019 General Palindromic Number 题解本题难度不大,主要是考察了一个进制转换问题,请参照我的另一博客r进制转换代码#include <stdio.h>#include <iostream>using namespace std;int main(){ int N,b; cin>>N>>b; int z[100];

2021-06-06 22:35:54 86

原创 r进制转换

如何实现将a转换为r进制数 在我们的编码中经常会遇到如何进行进制之间的转换,那么我们如何快速地将进制转换并且存贮呢?代码如下:z[num++]=n%r;n/=r;在这里,我们采用了数组对转换后的数值进行存储,其中num初始为零,为元素个数,z为用以计数的数组,n为原始数据,r为需要转换的进制...

2021-06-06 22:13:09 605

原创 如何将单链表反向输出

链表——如何将单链表反向输出方法一将单链表反置再输出,此方法比较繁琐方法二将单链表输出到栈内,再逐个将栈弹出,此方法需要占用额外的空间方法三使用递归,内层不断嵌套,此方法空间复杂度较高...

2021-06-06 21:39:35 591

原创 PAT 1015 Reversible Primes

PAT 1015Reversible Primes题目1015 Reversible Primes (20 分)A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also

2021-06-04 10:13:04 154

原创 PAT 1011 World Cup Betting

PAT 1011 World Cup Betting问题1011 World Cup Betting (20 point(s))With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South

2021-05-25 17:58:21 101 1

原创 PAT 1008 Elevator

PAT甲级1008 Elevator链接地址:PAT Elevator原题:The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move

2021-05-15 23:34:58 115 5

原创 完美立方

A-完美立方题目介绍:For hundreds of years Fermat’s Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c^n, has remained elusively unproven. (A re...

2020-02-26 00:12:02 395

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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