/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
public static String week
[ ] = { "monday" ,
"tuesday" ,
"wednesday" ,
"thursday" , "friday" , "saturday" , "sunday" } ;
public static int number[ ] = { 0 , 31 , 59 , 90 , 120 , 151 , 181 , 212 , 243 , 273 ,
304 , 334 } ;
public static boolean leap( int rok) {
return ( ( rok % 4 == 0 && rok % 100 != 0 ) || rok % 400 == 0 ) ;
}
public static int dayN( int day, int month, int year) {
int dayYear;
int a, b, c;
int result;
dayYear = day+ numberDay[ month- 1 ] ;
if ( ( month > 2 ) && ( leap( year) == true ) )
dayYear++;
a = ( year - 1 ) % 100 ;
b = ( year - 1 ) - a;
c = a + ( b / 4 ) ;
d = ( ( ( ( ( b / 100 ) % 4 ) * 5 ) + c) % 7 ) ;
d += dayYear - 1 ;
d %= 7 ;
return f;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KcHVibGljIGNsYXNzIENvbGxlY3Rpb257CiAKICAgIHB1YmxpYyBzdGF0aWMgU3RyaW5nIHdlZWtbXSA9IHsgIm1vbmRheSIsICJ0dWVzZGF5IiwgIndlZG5lc2RheSIsCiAgICAgICAgICAgICJ0aHVyc2RheSIsICJmcmlkYXkiLCAic2F0dXJkYXkiLCAic3VuZGF5IiB9OwogICAgcHVibGljIHN0YXRpYyBpbnQgbnVtYmVyW10gPSB7IDAsIDMxLCA1OSwgOTAsIDEyMCwgMTUxLCAxODEsIDIxMiwgMjQzLCAyNzMsCiAgICAgICAgICAgIDMwNCwgMzM0IH07CiAKICAgIHB1YmxpYyBzdGF0aWMgYm9vbGVhbiBsZWFwKGludCByb2spIHsKICAgICAgICByZXR1cm4gKChyb2sgJSA0ID09IDAgJiYgcm9rICUgMTAwICE9IDApIHx8IHJvayAlIDQwMCA9PSAwKTsKICAgIH0KIAogICAgcHVibGljIHN0YXRpYyBpbnQgZGF5TihpbnQgZGF5LCBpbnQgbW9udGgsIGludCB5ZWFyKSB7CiAgICAgICAgaW50IGRheVllYXI7CiAgICAgICAgaW50IGEsIGIsIGM7CiAgICAgICAgaW50IHJlc3VsdDsKICAgICAgICBkYXlZZWFyID0gZGF5KyBudW1iZXJEYXlbbW9udGgtIDFdOwogICAgICAgIGlmICgobW9udGggPiAyKSAmJiAobGVhcCh5ZWFyKSA9PSB0cnVlKSkKICAgICAgICAgICAgZGF5WWVhcisrOwogICAgICAgIGEgPSAoeWVhciAtIDEpICUgMTAwOwogICAgICAgIGIgPSAoeWVhciAtIDEpIC0gYTsKICAgICAgICBjID0gYSArIChiIC8gNCk7CiAgICAgICAgZCA9ICgoKCgoYiAvIDEwMCkgJSA0KSAqIDUpICsgYykgJSA3KTsKICAgICAgICBkICs9IGRheVllYXIgLSAxOwogICAgICAgIGQgJT0gNzsKICAgICAgICByZXR1cm4gZjsKICAgIH0KfQ==
compilation info
Main.java:8: error: class Collection is public, should be declared in a file named Collection.java
public class Collection{
^
Main.java:23: error: cannot find symbol
dayYear = day+ numberDay[month- 1];
^
symbol: variable numberDay
location: class Collection
Main.java:29: error: cannot find symbol
d = (((((b / 100) % 4) * 5) + c) % 7);
^
symbol: variable d
location: class Collection
Main.java:30: error: cannot find symbol
d += dayYear - 1;
^
symbol: variable d
location: class Collection
Main.java:31: error: cannot find symbol
d %= 7;
^
symbol: variable d
location: class Collection
Main.java:32: error: cannot find symbol
return f;
^
symbol: variable f
location: class Collection
6 errors
stdout