herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
你會用C的算子sizeof?
-
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence C++ & Python都有字串的find,用法都類似 split=s.find(' ', split+1)能找到s從index=split+1開...
-
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations heap/priority queue是重要的資料結構,無論是C++的std::priority_q...
45 則留言:
try webproxy
public class ex_01 { static double show(int n){ double p=1; for(int i=2;i<=n;i++) p=p*i; return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0;i<=n;i++) sum+=1.0/show(i); System.out.println(sum); }}
public class ex1030 { static double show(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n ;i++) sum+=1.0/show(i); System.out.println(sum); } }
public class ex1030 { static double show(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n ; i++) sum+=1.0/show(i); System.out.println(sum); }
}
public class b1013300701 { static double factorial(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; }
public static void main(String[] args) { double sum=0; int N=20; for(int i=0; i<=N ;i++){ sum+=1.0/factorial(i); } System.out.println(sum); }
}
public class exx1 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class jimmy111 {
static double factorial (int n){
double p=1;
for(int i=2;i<n;i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
int n=22;
System.out.println(factorial(12));
}
}
public class jimmy111 { static double factorial (int n){ double p=1; for(int i=2;i<n;i++){ p=p*i; } return p; }
public static void main(String[] args) { int n=22; System.out.println(factorial(12)); }}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class A10433011 {
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
A10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
A10433018
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
A10433024
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
A10433022
public class EX1 {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=1000000;
for(int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
import java.util.Scanner;
public class tast1 {
public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("輸入階層N"); int x=input.nextInt(); double p=1,sum=1; for(int i=1; i<=x ;i++){ p*=i; sum=sum+1/p; } System.out.println(sum); }}
a10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class GG {
public static void main(String[] args) { double n=100000,p=1,i,a=1; for(i=1;i<=n;i++){ p=p*i; a=a+1.0/p;} System.out.println(a); }}
public class GG {
public static void main(String[] args) { double n=100000,p=1,i,a=1; for(i=1;i<=n;i++){ p=p*i; a=a+1.0/p;} System.out.println(a); }}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
import java.util.Scanner;public class zx { public static void main(String[] args) { int x; double d=1; double c =1 ; Scanner a = new Scanner(System.in); System.out.println("N="); x= a.nextInt(); for (int n=1;n<=x;n++){ c=n*c; d+=1.0/c;} System.out.println(d);}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
a10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class hello123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0; i<=n ;i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
id="result-source" class="sh_html sh_sourceCode"><span class="sh_keyword"
public class jimmy111 { static double factorial (int n){ double p=1; for(int i=2;i<n;i++){ p=p*i; } return p; }
public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n; i++) sum+=1.0/factorial(i); System.out.println(sum); System.out.println(Math.E); }
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class cgvcb {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=100;
for (int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
A10433018
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
A10433024
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class cgvcb {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=100;
for (int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
package hello;
public class EX1 {
static double factorial(int n){
double p=1;
for (int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
long n=20;
double sum=1;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
}
package hello;
public class EX1 {
static double factorial(int n){
double p=1;
for (int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
long n=20;
double sum=1;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
}
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class A10433022 {
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
張貼留言