最新 最热

hdu1023

#include <stdio.h>#include <string.h>#define BASE 10000#define PFMT "%04d"#define MAX 105void print_bn(int*a, int l){int i;for(i=l-1;i>0;i--)if(a[i]>...

2018-06-04
1

hdu1004

//c//https://github.com/WEIZIBIN/acm/blob/master/hdu1004.c#include <stdio.h>#include <string.h>int main(){int i, n, j;char s[1005][15];int count[1005] =...

2018-06-04
1

hdu1005

//c//https://github.com/WEIZIBIN/acm/blob/master/hdu1005.c#include <stdio.h>int main(){int i, result, a, b, j;long n;int f[50] = {0};f[1] = 1;f[2] = 1;...

2018-06-04
1

strlen()

头文件:#include<string.h>使用char*s="GoldenGlobalView";printf("%s has %d chars",s,strlen(s));作用:返回字符串长度。遇到“”后返回,不包含结束符“”。 sizeof返回的是变量所占用的内存数,不是实际长度。并且,s...

2018-05-28
1

memcmp()

函数原型:int memcmp(const void *buf1, const void *buf2, unsigned int count);/* * 比较buf1和buf2的前count的字节*/头文件:#include<string.h>或#include<memory.h>返回值:当buf1<b......

2018-05-28
1

memmove()

头文件:#include<string.h>源函数:void *memmove( void* dest, const void* src, size_t count );//从src所指向的位置复制count个字节到dest所指向的位置

2018-05-28
0

Nebula3学习笔记(2): Hello World

1: #include 2: #include 3: #include 4: #include 5: 6: using namespace Core 7: 8: 9: 10: 11: PtrCoreServer coreServer CoreServerCreate12: c...

2018-05-23
1

assert断言

assert是一个宏定义,其作用是如果它的条件返回错误,则终止程序执行,原型定义:1 #include <assert.h>2 void assert( int expression );assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条...

2018-03-07
1

Leetcode 264. Ugly Number II

Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9...

2018-01-12
1

Leetcode 263. Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6,...

2018-01-12
1