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...
38 則留言:
import java.util.Scanner;
class JAVA
{
public static void main(String[] args)
{
Scanner Scanner = new Scanner(System.in);
while (Scanner.hasNext())
{
int x = Scanner.nextInt();
if (( x % 4 == 0 && x % 100 != 0) || x % 400 == 0 )
System.out.println("閏年");
else
System.out.println("平年");
}
}
}
import java.util.Scanner;
public class HIHI {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int x=input.nextInt();
if(x%400==0)
System.out.println("閏年");
else if(x%100==0)
System.out.println("平年");
else if(x%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
import java.util.Scanner;
public class D10033003 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a=input.nextInt();
if(a%400==0)
System.out.print("閏年");
else if(a%100==0)
System.out.print("平年");
else if(a%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class joneswang1314 {
public static void main(String[] args) {
Scanner Input=new Scanner(System.in);
int x=Input.nextInt();
if(x%400==0)
System.out.print("潤年");
else if(x%100==0)
System.out.print("平年");
else if(x%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class BADBOY {
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
int a=input.nextInt();
if(a%400==0)
System.out.print("潤");
else if(a%100==0)
System.out.print("平");
else if(a%4==0)
System.out.print("潤");
else
System.out.print("平");
}
}
import java.util.*;
public class D10033029_5
{
public static void main(String[] args)
{
int year,rem4,rem100,rem400;
Scanner scanner = new Scanner(System.in);
System.out.print("請輸入年份: ");
year = scanner.nextInt();
System.out.println();
rem4 = year % 4;
rem100 = year % 100;
rem400 = year % 400;
/* 巢狀if */
if ( rem4 == 0)
{
if ( rem100 == 0 )
{
if ( rem400 == 0)
{
System.out.println(year + "該年分為閏年");
}
else
{
System.out.println(year + "該年分為平年");
}
}
else
{
System.out.println(year + "該年分為閏年");
}
}
else
{
System.out.println(year + "該年分為平年");
}
}
}
import java.util.Scanner;
public class EX2 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
}
}
public class dfg6666 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0)
System.out.println("閏年");
else if (n%100==0)
System.out.println("平年");
else if (n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
import java.util.Scanner;
public class ex2 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%4!=0)System.out.println("平年");
else if(n%400==0)System.out.println("閏年");
else if(n%100==0)System.out.println("平年");
else System.out.println("閏年");
}
}
public class YAYA123456 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0)
System.out.println("閏年");
else if (n%100==0)
System.out.println("平年");
else if (n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
public class KKK {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0)
System.out.println("閏年");
else if (n%100==0)
System.out.println("平年");
else if (n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
import java.util.Scanner;
public class Promise520520 {
public static void main(String[] args) {
{
Scanner Scanner=new Scanner(System.in);
while (Scanner.hasNext())
{
int x=Scanner.nextInt();
if ((x%4==0&&x%100!=0)||x%400==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
}
}
import java.util.Scanner;
public class fghgfh {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0) System.out.println("平年");
else if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else System.out.println("閏年");
import java.util.Scanner;
/*
* 輸入公元n年,輸出"平年" "閏年"
*/
public class a {
public static void main(String[] args)
{
//System.out.println("請輸入公元年,可以分辨平年或閏年:");
Scanner scr;
scr=new Scanner(System.in);
int s =scr.nextInt();
if(s%4!=0)
System.out.println("平年");
else if(s%400==0)
System.out.println("閏年");
else if(s%100==0)
System.out.println("平年");
else
System.out.println("閏年");
}
}
import java.util.Scanner;
public class EX2 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
}
}
import java.util.Scanner;
public class happy {
public static void main(String[] args) {
Scanner Scanner=new Scanner(System.in);
while (Scanner.hasNext())
{
int x =Scanner.nextInt();
if (( x % 4 == 0 && x % 100 != 0) || x % 400 == 0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
}
}
D10333010 柯羿瑄
import java.util.Scanner;
public class hioo {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0) System.out.println("平年");
else if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else System.out.println("閏年");
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0) System.out.println("平年");
else if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else System.out.println("閏年");
}
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int x=input.nextInt();
if(x%400==0)
System.out.println("閏年");
else if(x%100==0)
System.out.println("平年");
else if(x%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
y10310066 陳昤瑄
import java.util.Scanner;
public class sdf {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0)System.out.println("平年");
else if (n%400==0)System.out.println("閏年");
else if (n%100==0)System.out.println("平年");
else System.out.println("閏年");
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0) System.out.println("平年");
else if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else System.out.println("閏年");
}
}
Scanner input =new Scanner(System.in);
int n = input.nextInt();
if(n%400==0) System.out.println("閏年");
else if(n%100==0)System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
package hello;
import java.util.Scanner;
public class Jimmy0511 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0)
System.out.print("閏年");
else if(n%100==0)
System.out.print("平年");
else if(n%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class NINI2 {
public static void main(String[] args) {
Scanner Input=new Scanner(System.in);
int x=Input.nextInt();
if(x%400==0)
System.out.print("閏年");
else if(x%100==0)
System.out.print("平年");
else if(x%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class D10333015 {
public static void main(String[] args) {
Scanner Input=new Scanner(System.in);
int x=Input.nextInt();
if(x%400==0)
System.out.print("閏年˙");
else if(x%100==0)
System.out.print("平年");
else if(x%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%4!=0) System.out.println("平年");
else if(n%400==0) System.out.println("閏年");
else if(n%100==0) System.out.println("平年");
else System.out.println("閏年");
}
}
import java.util.Scanner;
public class HW01 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%400==0)
System.out.println("閏年");
else if(n%100==0)
System.out.println("平年");
else if(n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
import java.util.Scanner;
public class HW01 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%400==0)
System.out.println("閏年");
else if(n%100==0)
System.out.println("平年");
else if(n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
package cc123;
import java.util.Scanner;
public class bb123 {
public static void main(String[] args) {
Scanner Input=new Scanner(System.in);
int x=Input.nextInt();
if(x%400==0)
System.out.print("閏年");
else if(x%100==0)
System.out.print("平年");
else if(x%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%400==0)
System.out.println("閏年");
else if(n%100==0)
System.out.println("平年");
else if(n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
import java.util.Scanner;
public class D10033093 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a=input.nextInt();
if(a%400==0)
System.out.print("閏年");
else if(a%100==0)
System.out.print("平年");
else if(a%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
D10033301 江姿穎提到...
import java.util.Scanner;
public class D10033003 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a=input.nextInt();
if(a%400==0)
System.out.print("閏年");
else if(a%100==0)
System.out.print("平年");
else if(a%4==0)
System.out.print("閏年");
else
System.out.print("平年");
}
}
import java.util.Scanner;
public class EX2 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if (n%400==0) System.out.println("閏年");
else if (n%100==0) System.out.println("平年");
else if (n%4==0) System.out.println("閏年");
else System.out.println("平年");
}
}
import java.util.Scanner;
public class wa {
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
int a=input.nextInt();
if(a%400==0)
System.out.print("潤");
else if(a%100==0)
System.out.print("平");
else if(a%4==0)
System.out.print("潤");
else
System.out.print("平");
}
}
import java.util.Scanner;
public class Hey {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(n%400==0)
System.out.println("閏年");
else if(n%100==0)
System.out.println("平年");
else if(n%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
public class HIHI {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int x=input.nextInt();
if(x%400==0)
System.out.println("閏年");
else if(x%100==0)
System.out.println("平年");
else if(x%4==0)
System.out.println("閏年");
else
System.out.println("平年");
}
}
張貼留言