#1040: 哪裡錯了


fishwish (Fish)

學校 : 國立臺南女子高級中學
編號 : 2356
來源 : [180.177.105.160]
最後登入時間 :
2017-12-31 11:27:54
d047. 10070 - Leap Year or Not Leap Year and ... -- UVa10070 | From: [61.223.96.67] | 發表日期 : 2008-12-09 01:08

#include<iostream>
using namespace std;
int main(){
 long long int y;
 int k=0;
 while(cin>>y){
  if(y%4==0&&y%100!=0||y%400==0){
  cout<<"This is leap year."<<endl;
     k=1;
  }
  if(y%15==0)
  cout<<"This is huluculu festival year."<<endl;
  if(y%55==0&&k==1)
  cout<<"This is bulukulu festival year."<<endl;
  
  
  else if(k!=1&&y%15!=0&&y%55!=0)
  cout<<"This is an ordinary year."<<endl;
  k=0;

  }
 
 return 0;
 }

 

 

到底是哪裡錯了

 

救我一下:(

 
#1048: Re:哪裡錯了


snail (蝸牛)

學校 : 新北市立板橋高級中學
編號 : 2021
來源 : [203.64.161.123]
最後登入時間 :
2024-05-17 08:42:08
d047. 10070 - Leap Year or Not Leap Year and ... -- UVa10070 | From: [218.211.230.114] | 發表日期 : 2008-12-11 03:04

已用站內訊息回答您了喔! 
ZeroJudge Forum