herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
你會用C的算子sizeof?
-
XOR prefixsum CPP python解Leetcode 1829 Maximum XOR for Each Query 其實這裡考慮的是元素個數為2^maximumBit的交換群,運算子為XOR。 [Python code請進]
-
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence C++ & Python都有字串的find,用法都類似 split=s.find(' ', split+1)能找到s從index=split+1開...
77 則留言:
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
package hw1;
public class p1 {
static int f3(int n)
{
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f;
}
public static void main(String[] args)
{
int n=10;
System.out.println(f3(n));
}
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int n=10;
System.out.println(f3(n));
}
}
package hw1;
public class ex2 {
public static void main(String[] args)
{
int t[] ={75,76,80,82,87,87,87,88,90,92,92,97};
int w[] ={2,3,2,3,2,2,0,2,2,0,0,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=t[i]*w[i];
average =(double) sum /20 ;
System.out.println("sum="+sum);
System.out.println("加權分數="+average);
}
}
package HH;
public class h2 {
public static void main(String[] args)
{
int t[] ={94,81,86,70,92,84,78,83,96,74,84,81,86};
int w[] ={0,2,2,2,0,3,2,2,3,2,0,0,2};
int sum=0;
double average ;
for(int i=0;i<t.length;i++)
sum+=t[i]*w[i];
average =(double) sum/20;
System.out.println("sum"+sum);
System.out.println("Average"+average);
}
}
package hello;
public class hw2 {
public static void main(String[] args)
{
int[]t={97,74,82,74,60,70,60,80,94,82};
int[]s={2,0,0,2,3,2,2,3,0,2,2};
int sum=0;
double average;
for (int i=0;i<10;i++)
sum+=t[i];
average=(double) sum/10;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
public class HW1 {
public static void main(String[] args) {
int t[] = {73,78,79,72,64,83,67,76};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package P1;
public class 加權平均數
{
public static void main(String[] args)
{
int t[]={94,86,68,97,78,80,95,93};
int w[]={4,3,3,3,2,2,2,2};
int sum=0;
int a;
double average;
a=0;
for(int i=0;i<8;i++)
a+=w[i];
for(int j=0;j<8;j++)
sum+=t[j]*w[j];
average=sum/a;
System.out.println("加權平均數="+average);
}
}
public class ff {
public static void main(String[] args) {
int t [] = {60,77,69,60,68,92,65,85,};
int w [] = {2,2,2,3,3,2,3,4,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package h;
public class m
{
public static void main(String[] args)
{
int t[] = {82,68,64,69,69,69,60,67};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class dd {
public static void main(String[] args) {
// TODO Auto-generated method stub
int t[] = {83,82,62,86,67,69,84,63};
int w[] = {2,2,2,2,2,3,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum"+sum);
System.out.println("average"+average);
}
package p1;
public class ff {
public static void main(String[] args)
{
int t[] = {69,77,83,71,60,60,60,74};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public static void main(String[] args) {
int t[] ={74,73,67,60,83,60,67,80,69,69,80,73};
int w[] ={0,2,2,2,0,3,3,2,3,4,0,0};
int sum=0;
int p=0;
double average;
for (int j=0;j<12;j++)
p+=w[j];
for(int i=0;i<12;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package hw1;
public class p1 {
public static void main(String[] args)
{
int t[] ={80,82,89,75,60,81,63,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average =(double) sum/p;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
package p1;
public class ff {
public static void main(String[] args)
{
int t[] = {69,77,83,71,60,60,60,74};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package p1;
public class hw1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int t[]={75,84,67,91,68,60,84,66,72};
int w[]={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package hw1;
public class p1 {
public static void main(String[ ] args){
int t [ ]= {71,72,83,72,60,70,77,74};
int w [ ]= {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
public class hw1
{
public static void main(String[] args)
{
int [] t={78,85,89,75,99,80,99,75};
int [] w={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average =(double)sum/p;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
package p1;
public class hw1 {
public static void main(String[] args)
{
int[] t={71,74,84,70,60,78,70,73};
int[] w={2,2,2,3,3,2,2,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average=(double) sum/p;
System.out.println("Sum:"+sum);
System.out.println("average:"+average);
}
}
public class ff {
public static void main(String[] args) {
int t [] = {71,73,70,61,66,85,66,85,};
int w [] = {2,2,2,3,3,2,3,4,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
class ff {
static public void main ( String [] argv )
{
int [] t ={81 ,93 ,77 ,59 ,69 ,85 ,90 ,83 ,100 ,75};
int sum =0;
double average ;
for(int i=0;i <10; i++)
sum +=t[i];
average =( double ) sum / 10;
System .out. println ("Sum:"+sum );
System .out. println (" Average :"+ average );
}
}
public static void main(String[] args)
{
int t[] ={77,79,80,75,70,84,70,77};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package p1;
public class ff {
public static void main(String[] args)
{
int t[] = {50,74,77,60,66,67,64,76};
int w[] = {2,2,2,3,3,2,3,4};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class Amy {
public static void main(String[] args) {
int t[] ={73,78,79,72,64,83,67,76};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
package hw;
public class hw1 {
public static void main(String[] args)
{
int t[] = {69,72,73,66,66,70,75,78};
int w[] = {2,2,2,3,3,2,3,4};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package homework;
public class hw {
public static void main(String[] args) {
int[] w={2,2,2,3,3,2,3,4,2};
int[] t={83,28,70,63,74,67,72,85,69};
double sum=0;
double ts=0;
double average;
for(int i=0;i<8;i++){
sum+=w[i];
}
for(int j=0;j<8;j++){
ts+=t[j]*w[j];
}
average=ts/sum;
System.out.print(average);
}
}
package h1;
public class w1 {
public static void main(String[] args) {
int [] t={85, 70, 93, 84, 93, 82, 62, 80, 73, 75, 72, 70};
int [] w={0,2,2,2,0,3,2,2,3,2,0,0};
int sum=0;
int p=0;
double average;
for(int j=0;j<=11;j++)
p+=w[j];
for(int i=0;i<=11;i++)
sum=t[i]*p;
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
package ff;
public class h2
{
public static void main(String[] args)
{
int w[]={45,66,44,100,85};
int t[]={1,2,3,5,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<5;j++)
p+=t[j];
for(int i=0;i<5;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class ff {
public static void main(String[] args) {
int t[] = {75,64,65,74,87,71,73,62};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package hw1;
public class p1 {
public static void main(String[] args)
{
int t[] ={82,62,98,78,65,75,85,68};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum=t[i]*p;
average =(double) sum/p;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
public class hh {
public static void main(String[] args) {
int t[] = {78,68,70,70,60,65,60,68};
int w[] = {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class hw1 {
public static void main(String[] args)
{
int [] t={85,96,85,87,74,86,91,80,87};
int [] w={2,2,2,3,2,2,3,2,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average=(double)sum/20;
System.out.println("sum="+sum);
System.out.println("average="+average);
}
}
public class dd {
public static void main(String[] args) {
int[] t={78,92,65,76,60,74,70,78};
int[] w={2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int i=0;i<8;i++)
p+=w[i];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average =(double) sum/p;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
public class Hello {
public static void main(String[] args) {
int w[]={45,66,44,12,32};
int t[]={1,1,16,5,2};
int SUM=0;
int p=0;
double average;
for(int j=0;j<5;j++)
p+=w[j];
for(int i=0;i<5;i++)
SUM=t[i]*p;
average=(double)SUM/p;
System.out.println("SUM:+SUM");
System.out.println("average:"+average);
}
}
public class Hello {
public static void main(String[] args) {
int w[]={45,66,44,12,32};
int t[]={1,1,16,5,2};
int SUM=0;
int p=0;
double average;
for(int j=0;j<5;j++)
p+=w[j];
for(int i=0;i<5;i++)
SUM=t[i]*p;
average=(double)SUM/p;
System.out.println("SUM:+SUM");
System.out.println("average:"+average);
}
}
package ff;
public class h2
{
public static void main(String[] args)
{
int w[]={45,66,44,100,85};
int t[]={1,2,3,5,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<5;j++)
p+=t[j];
for(int i=0;i<5;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class hw2
{
public static void main(String[] args)
{
int[]t={84,82,79,67,93,80,60,77,82,71,65,84};
int[]w={0,2,2,2,0,3,2,2,3,2,0,0};
int sum=0;
double average;
for(int i=0;i<12;i++)
sum+=w[i]*t[i];
average=(double)sum/18;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
package test1;
class ff {
public static void main(String[] args) {
int [] w ={1,2,3,3,3,1,3,2,2,3};
int [] t ={82,69,60,27,60,74,60,30,0,60};
int Sum=0;
int p=0;
double average;
for(int j=0; j<10;j++)
p+=w[j];
for(int i=0;i<10;i++)
Sum=t[i]*p;
average=(double)Sum/p;
System.out.println("Sum:"+Sum);
System.out.println("average:"+average);
}
}
package h1;
public class w2 {
public static void main(String[] args) {
int [] t={80, 75, 90, 78, 93, 82, 60, 80, 74, 70, 72, 75};
int [] w={0,2,2,2,0,3,2,2,3,2,0,0};
int sum=0;
int p=0;
double average;
for(int j=0;j<=11;j++)
p+=w[j];
for(int i=0;i<=11;i++)
sum=t[i]*p;
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
package b10333067;
public class p1 {
public static void main(String[] args) {
int[] t={66,69,87,55,64,60,60,67,60,71,60,64};
int[] w={0,2,2,2,0,3,2,2,3,2,0,0};
int sum=0;
int p=0;
double average;
for(int j=0;j<=11;j++)
p+=w[j];
for(int i=0;i<=11;i++)
sum=t[i]*p;
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
package ff;
public class h2
{
public static void main(String[] args)
{
int w[]={45,66,44,100,85};
int t[]={1,2,3,5,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<5;j++)
p+=t[j];
for(int i=0;i<5;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class HW1 {
public static void main(String[] args) {
int t[]= {84,85,76,61,61,77,77,67};
int w[]= {2,2,2,3,2,2,3,2};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class p1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] w={0,2,2,2,0,3,2,2,3,2,0,0};
int[] t={82,89,87,61,89,78,60,81,62,79,60,70};
int sum=0;
double average;
for(int i=0;i<11;i++)
sum+=t[i];
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
public class average {
public static void main(String[] args) {
int[] t={82,74,99,96,93,73,67,85,81,79,77,90};
int[] w={0,0,2,2,3,2,3,2,2,2,2,0};
int sum=0;
double average;
for(int i=0;i<12;i++)
sum+=w[i]*t[i];
average=(double)sum/20;
System.out.println("sum="+sum);
System.out.println("average="+average);
}
}
public class java {
public static void main(String[] args) {
int t[]={86,83,72,80,66,71,89,78,82,76,77,91};
int w[]={2,2,2,3,2,2,3,2,0,0,2,0};
int sum=0;
double average;
for(int i=0;i<12;i++)
sum+=w[i]*t[i];
average=(double)sum/20;
System.out.println("sum="+sum);
System.out.println("average="+average);
}
}
package p1;
public class hw1 {
public static void main(String[] args) {
int []t={80,85,81,71,82,91,92,75};
int []w={2,2,2,3,2,2,3,2};
int sum=0;
int a=0;
double average;
for(int i=0;i<8;i++)
a+=w[i];
for(int k=0;k<8;k++)
sum+=t[k]*w[k];
average=sum/a;
System.out.println("sum="+average);
}
}
package p1;
public class hw1 {
public static void main(String[] args) {
int []t={80,85,81,71,82,91,92,75};
int []w={2,2,2,3,2,2,3,2};
int sum=0;
int a=0;
double average;
for(int i=0;i<8;i++)
a+=w[i];
for(int k=0;k<8;k++)
sum+=t[k]*w[k];
average=sum/a;
System.out.println("sum="+average);
}
}
package p1;
public class hw3 {
public static void main(String[] args) {
int []a={74,91,82,69,60,67,60,75};
int []b={2,2,2,3,2,2,3,2};
int s=0;
int x=0;
double average;
for(int j=0;j<8;j++)
x+=b[j];
for(int i=0;i<8;i++)
s+=a[i]*b[i];
average=(double) s/x;
System.out.println("sum="+average);
}
}
package ex0915;
public class p1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] w={0,2,2,2,0,3,2,2,3,2,0,0};
int[] t={81,88,80,92,89,70,66,82,71,78,75,74};
int sum=0;
double average;
for(int i=0;i<=11;i++)
sum+=t[i];
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
public class hw1 {
public static void main(String[] args) {
int t[]={79,87, 60, 72, 60, 69, 60, 74,};
int w[]={2,2,2,2,2,2,2,2,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("*sum:"+sum);
System.out.println("average:"+average);
}
}
package zcc;
public class asdf {
public static void main(String[] args) {
int t[] ={83,81,91,86,82,83,99,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average =(double) sum / 18 ;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
public class B10333065_0915 {
public static void main(String[] args) {
int t[] ={61,70,74,77,77,78,79,80};
int w[] ={2,3,2,2,2,1,3,2};
int sum = 0;
int p=0;
double average;
for (int j= 0;j<8 ;j++)
p+=w[j];
for (int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}}
public class hw1 {
public static void main(String[] args) {
int t[]={79,87, 60, 72, 60, 69, 60, 74,};
int w[]={2,2,2,2,2,2,2,2,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("*sum:"+sum);
System.out.println("average:"+average);
}
}
public class b10333078_915 {
public static void main(String[] args) {
int t []={78,72,87,62,72,79,60,83};
int w []={2,2,2,2,3,2,2,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
package p1;
public class hw2 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] w={0,2,2,2,0,3,2,2,3,2,0,0};
int[] t={84,90,87,60,60,75,60,80,82,70,68,70};
int sum=0;
double average;
for(int i=0;i<11;i++)
sum+=t[i];
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
public class gg {
public static void main(String[] args) {
int[] w={0,2,2,2,0,3,2,2,3,2,0,0};
int[] t={81,90,87,60,92,75,60,80,84,71,67,70};
int sum=0;
double average;
for(int i=0;i<11;i++)
sum+=t[i];
average=(double) sum/12;
System.out.println("總分="+sum);
System.out.println("平均="+average);
}
}
package zcc;
public class asdf {
public static void main(String[] args) {
int t[] ={83,81,91,86,82,83,99,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average =(double) sum / 18 ;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
package zcc;
public class asdf {
public static void main(String[] args) {
int t[] ={83,81,91,86,82,83,99,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average =(double) sum / 18 ;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
public class p2 {
public static void main(String[] args)
{
int t[] ={78,66,76,90,60,79,80,61};
int w[] = {2,2,2,2,3,3,3,2};
int sum = 0 ;
double average;
for(int j=0;j<8;j++)
sum+=w[j]*t[j];
average= (double) sum/18;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
package zcc;
public class asdf {
public static void main(String[] args) {
int t[] ={83,81,91,86,82,83,99,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average =(double) sum / 18 ;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
package zcc;
public class asdf {
public static void main(String[] args) {
int t[] ={83,81,91,86,82,83,99,74};
int w[] ={2,2,2,3,2,2,3,2};
int sum=0;
double average;
for(int i=0;i<t.length;i++)
sum+=w[i]*t[i];
average =(double) sum / 18 ;
System.out.println("Sum:"+sum);
System.out.println("Average:"+average);
}
}
public class b10333078_915 {
public static void main(String[] args) {
int t []={78,72,87,62,72,79,60,83};
int w []={2,2,2,2,3,2,2,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
public class b10333078_915 {
public static void main(String[] args) {
int t []={78,72,87,62,72,79,60,83};
int w []={2,2,2,2,3,2,2,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
public class hw1 {
public static void main(String[] args) {
int t[]={79,87, 60, 72, 60, 69, 60, 74,};
int w[]={2,2,2,2,2,2,2,2,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("*sum:"+sum);
System.out.println("average:"+average);
}
}
public class b10333078_915 {
public static void main(String[] args) {
int t []={78,72,87,62,72,79,60,83};
int w []={2,2,2,2,3,2,2,2};
int sum=0;
int p=0;
double average;
for(int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("sum:"+sum);
System.out.println("average:"+average);
}
}
public class B10333093 {
public static void main(String[] args) {
double sum = 0;
double ta =0;
double avg = 0;
int[] w={2,2,2,3,2,2,3,2};
int[] t={80,75,62,75,60,60,69,72};
for (int i = 0; i < 8; i++) {
sum += w[i];
}
for (int j = 0; j < 8; j++) {
ta += t[j]*w[j];
}
avg = ta /sum;
System.out.println(avg);
}
}
public class hw1 {
public static void main(String[] args) {
int t[]={79,87, 60, 72, 60, 69, 60, 74,};
int w[]={2,2,2,2,2,2,2,2,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("*sum:"+sum);
System.out.println("average:"+average);
}
}
public class hw1 {
public static void main(String[] args) {
int t[]={79,87, 60, 72, 60, 69, 60, 74,};
int w[]={2,2,2,2,2,2,2,2,};
int sum=0;
int p=0;
double average;
for (int j=0;j<8;j++)
p+=w[j];
for(int i=0;i<8;i++)
sum+=t[i]*w[i];
average=(double)sum/p;
System.out.println("*sum:"+sum);
System.out.println("average:"+average);
}
}
B10334016劉在能
public class hw1 {
public static void main(String[] args) {
long f[]=new long [92];
f[0]=f[1]=1;
for (int i=2; i"+f[i]);
}
}
}
public class hw1 {
public static void main(String[] args) {
long f[]=new long [92];
f[0]=f[1]=1;
for (int i=2; i"+f[i]);
}
}
}
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
public class ex1{
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
public class ex1 { public static void main(String[] args) { int[] t={83,60,74,63,88,62,69,82,85,72,69,70}; int[] w={0,2,2,2,0,3,2,2,3,2,0,0}; int sum=0; int p=0; double average; for(int j=0;j<=11;j++) p+=w[j]; for(int i=0;i<=11;i++) sum=t[i]*p; average=sum/18; System.out.println("總分="+sum); System.out.println("平均="+average); } }
public class ff {
static int f3(int n){
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f ;
}
public static void main(String[] args) {
int n=10;
System.out.println(f3(n));
}
}
package hw1;
public class p1 {
static int f3(int n)
{
int f=1;
for(int i=2; i<=n; i++)
f*=i;
return f;
}
public static void main(String[] args)
{
int n=10;
System.out.println(f3(n));
}
張貼留言