码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
简单代码 //输入三个数求最大值.
static void Main(){ //输入三个数求最大值. string answar = "y"; while (answar=="y"||answar=="Y") { int x,y,z,max; Console.WriteLine("请输入第一个数:"); x = int.Parse(C ...
分类:其他好文   时间:2019-06-03 12:31:02    阅读次数:81
吴裕雄--天生自然 JAVA开发学习:方法
/** 返回两个整型变量数据的较大值 */ public static int max(int num1, int num2) { int result; if (num1 > num2) result = num1; else result = num2; return result; } pub... ...
分类:编程语言   时间:2019-06-02 15:38:25    阅读次数:101
C语言课后习题
/*最大公约数求解*/#include "stdafx.h"#include <stdio.h>int main(){ int max(int,int); int a,b; printf("Please input your numbers\n"); scanf("%d,%d\n",&a,&b);  ...
分类:编程语言   时间:2019-05-18 00:44:36    阅读次数:103
hdu6521 吉司机线段树
待填 代码 ...
分类:其他好文   时间:2019-05-06 01:20:42    阅读次数:173
求最长回文串
题目描述如下: 能立刻想到的就是爆破,先试试无脑爆破,时间复杂度O(n^3),然后毫无意外的超时了,爆破代码如下: public String longestPalindrome(String s) { int max = 0; int length = s.length(); // 字符串长度只有 ...
分类:其他好文   时间:2019-04-28 19:11:58    阅读次数:149
给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。
public String longestPalindrome(String s) { if(s == null||s.length()==0){ return s; } String res = ""; int max=0; boolean[][] dp = new boolean[s.l... ...
分类:其他好文   时间:2019-04-24 23:28:12    阅读次数:583
简单红包算法
static void Main(string[] args) { int a = 10; //数组长度 int b = 0; //小数位数 int min = 5; //最小数 int max = 20; //最大数 decimal[... ...
分类:编程语言   时间:2019-04-19 19:41:03    阅读次数:163
Java关于数字工具类~持续汇总~
1 /** 2 * 01 3 * 描述:求int数组中最大值 4 * 【时间 2019年3月5日下午3:21:36 作者 陶攀峰】 5 */ 6 public static int test01(int[]sz) { 7 int max = sz[0]; 8 for(int x=1; x<sz.le ...
分类:编程语言   时间:2019-04-18 17:21:29    阅读次数:155
树状数组求逆序数
代码 include using namespace std; define MAX_N 100 int bit[MAX_N + 1], n; long long f; int a[MAX_N]; int sum(int i){ int s = 0; while(i 0){ s += bit[i]; ...
分类:编程语言   时间:2019-04-16 14:24:13    阅读次数:164
1004 成绩排名 (20 分)
#include using namespace std; struct Stu { int score; string id, num; }stu; int main(){ string s1 ,s2 , s3, s4; int n, max = 0, min = 110; cin >> n; w... ...
分类:其他好文   时间:2019-04-16 01:05:02    阅读次数:185
1549条   上一页 1 ... 18 19 20 21 22 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!