- #include<stdio.h>
- #include<string.h>
- int main(void)
- {
- char y[100001];
- int m4,m100,m400,m15,m55,i,l,count=0;
- while (scanf("%s",&y)==1)
- {
- m4=0;
- m100=0;
- m15=0;
- m55=0;
- m400=0;
- if (count>0)
- printf("\n");
- count++;
- l=strlen(y);
- for (i=0;i<l;i++)
- {
- m4=(m4*10+y[i]-'0')%4;
- m55=(m55*10+y[i]-'0')%55;
- m15=(m15*10+y[i]-'0')%15;
- m100=(m100*10+y[i]-'0')%100;
- m400=(m400*10+y[i]-'0')%400;
- }
- if ((!m4 && m100) || !m400)
- {
- printf("This is leap year.\n");
- if (!m15)
- printf("This is huluculu festival year.\n");
- if (!m55)
- printf("This is bulukulu festival year.\n");
- }
- else
- {
- if (!m15)
- printf("This is huluculu festival year.\n");
- else
- printf("This is an ordinary year.\n");
- }
- }
- return 0;
- }
Wednesday, 4 April 2018
uva 10070 Leap Year or Not Leap Year solution
Subscribe to:
Post Comments (Atom)
variable declaration of c program
#include <stdbool.h> #include<bits/stdc++.h> #include <stdio.h> #include <string.h> #include <std...
-
#include<bits/stdc++.h> #include<cmath> #include<algorithm> #define mx 20000005 using namespace std ; ...
-
#include<stdio.h> #include<string.h> int main ( void ) { char y [ 100001 ] ; int m4,m100,m400,m15...
-
#include<bits/stdc++.h> using namespace std ; int main ( ) { int arr [ 10005 ] ; int n,m,mi,d ; ...
No comments:
Post a Comment