submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s060867508 | p00093 | C++ | #include <stdio.h>
void Leap_Year(int start_year, int end_year)
{
if ((start_year != 0) || (end_year != 0)) {
if (end_year - start_year < 3) {
if (((start_year % 4) < (end_year % 4)) || ((start_Year % 100) > (end_Year % 100))) {
if ((start_year % 400) < (end_year % 400)) {
printf("NA\n");
} else {
printf("%d", start_year + 4 - start_year % 4);
}
}
} else {
for (int i = start_year; i <= end_year; ++i) {
if (i % 400 != 0) {
if ((i % 100 != 0) && (i % 4 == 0)) {
printf("%d\n", i);
}
} else {
printf("%d\n", i);
}
}
}
}
}
int main(void)
{
int start_year, end_year;
scanf("%d %d", &start_year, &end_year);
Leap_Year(start_year, end_year);
return 0;
} | a.cc: In function 'void Leap_Year(int, int)':
a.cc:7:58: error: 'start_Year' was not declared in this scope; did you mean 'start_year'?
7 | if (((start_year % 4) < (end_year % 4)) || ((start_Year % 100) > (end_Year % 100))) {
| ^~~~~~~~~~
| start_year
a.cc:7:79: error: 'end_Year' was not declared in this scope; did you mean 'end_year'?
7 | if (((start_year % 4) < (end_year % 4)) || ((start_Year % 100) > (end_Year % 100))) {
| ^~~~~~~~
| end_year
|
s929407791 | p00093 | C++ | #include <stdio.h>
void Leap_Year(int start_year, int end_year)
{
while ((start_year != 0) || (end_year != 0)) {
if (0 < end_year - start_year < 3) {
if (((start_year % 4) < (end_year % 4)) || ((start_year % 100) > (end_year % 100))) {
if ((start_year % 400) < (end_year % 400)) {
printf("NA\n");
} else {
printf("%d\n", start_year + 4 - start_year % 4);
}
}
} else if(start_year == end_year) {
if (((start_year % 4 == 0) && (start_year % 100 != 0)) || (start_year % 400 == 0)) {
printf("%d\n", start_year);
} else {
printf("NA\n");
} else {
for (int i = start_year; i <= end_year; ++i) {
if (i % 400 != 0) {
if ((i % 100 != 0) && (i % 4 == 0)) {
printf("%d\n", i);
}
} else {
printf("%d\n", i);
}
}
}
scanf("%d %d", &start_year, &end_year);
if ((start_year != 0) || (end_year != 0)) {
printf("\n");
}
}
}
int main(void)
{
int start_year, end_year;
scanf("%d %d", &start_year, &end_year);
Leap_Year(start_year, end_year);
return 0;
} | a.cc: In function 'void Leap_Year(int, int)':
a.cc:19:15: error: expected '}' before 'else'
19 | } else {
| ^~~~
a.cc:14:43: note: to match this '{'
14 | } else if(start_year == end_year) {
| ^
|
s154258471 | p00093 | C++ | #include <stdio.h>
void Leap_Year(int start_year, int end_year)
{
while ((start_year != 0) || (end_year != 0)) {
if ((end_year - start_year > 0) && (end_year - start_year < 3)) {
if (((start_year % 4) < (end_year % 4)) || ((start_year % 100) > (end_year % 100))) {
if ((start_year % 400) < (end_year % 400)) {
printf("NA\n");
} else {
printf("%d\n", start_year + 4 - start_year % 4);
}
}
} else if(start_year == end_year) {
if (((start_year % 4 == 0) && (start_year % 100 != 0)) || (start_year % 400 == 0)) {
printf("%d\n", start_year);
} else {
printf("NA\n");
}
else {
for (int i = start_year; i <= end_year; ++i) {
if (i % 400 != 0) {
if ((i % 100 != 0) && (i % 4 == 0)) {
printf("%d\n", i);
}
} else {
printf("%d\n", i);
}
}
}
scanf("%d %d", &start_year, &end_year);
if ((start_year != 0) || (end_year != 0)) {
printf("\n");
}
}
}
int main(void)
{
int start_year, end_year;
scanf("%d %d", &start_year, &end_year);
Leap_Year(start_year, end_year);
return 0;
} | a.cc: In function 'void Leap_Year(int, int)':
a.cc:20:9: error: expected '}' before 'else'
20 | else {
| ^~~~
a.cc:14:43: note: to match this '{'
14 | } else if(start_year == end_year) {
| ^
|
s888965133 | p00093 | C++ | #include<stdio.h>
void leap_year(int start_year, int end_year);
int main(void)
{
int start_year;
int end_year;
int i = 0;
while(1){
scanf("%d %d", &start_year, &end_year);
if (start_year == 0 && end_year == 0) {
break;
} else {
if ( i == 1) {
printf("\n");
}
leap_year(start_year, end_year);
i = 1
}
}
return 0;
}
void leap_year(int start_year, int end_year)
{
int n = 0;
int year = start_year;
while (year <= end_year){
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)){
printf("%d\n", year);
n++;
}
year++;
}
if (n == 0){
printf("NA\n");
}
}
| a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '}' token
19 | i = 1
| ^
| ;
20 | }
| ~
|
s400507119 | p00093 | C++ | #include<stdio.h>
void leap_year(int start_year, int end_year);
int main(void)
{
int start_year;
int end_year;
int i = 0;
while(1){
scanf("%d %d", &start_year, &end_year);
if (start_year == 0 && end_year == 0) {
break;
} else {
if (i == 1) {
printf("\n");
}
leap_year(start_year, end_year);
i = 1
}
}
return 0;
}
void leap_year(int start_year, int end_year)
{
int n = 0;
int year = start_year;
while (year <= end_year){
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)){
printf("%d\n", year);
n++;
}
year++;
}
if (n == 0){
printf("NA\n");
}
} | a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '}' token
19 | i = 1
| ^
| ;
20 | }
| ~
|
s432812127 | p00093 | C++ | #include<stdio.h>
void leap_year(int start_year, int end_year);
int main(void)
{
int start_year;
int end_year;
int i = 0;
while(1){
scanf("%d %d", &start_year, &end_year);
if (start_year == 0 && end_year == 0) {
break;
} else {
if (i == 1) {
printf("\n");
}
leap_year(start_year, end_year);
i = 1
}
}
return 0;
}
void leap_year(int start_year, int end_year)
{
int n = 0;
int year = start_year;
while (year <= end_year){
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)){
printf("%d\n", year);
n++;
}
year++;
}
if (n == 0){
printf("NA\n");
}
} | a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '}' token
19 | i = 1
| ^
| ;
20 | }
| ~
|
s778501151 | p00093 | C++ | #include <stdio.h>
void uruu(int a, int b);
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
while (a != 0 || b != 0) {
uruu(a, b);
scanf("%d %d", &a, &b);
printf("\n")
}
return 0;
}
void uruu(int a, int b)
{
int count = 0;
for (int year = a; year <= b; ++year) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
++count;
} else {
if (year % 400 == 0) {
printf("%d\n", year);
++count;
}
}
}
}
if (count == 0) {
printf("NA\n");
}
} | a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before '}' token
13 | printf("\n")
| ^
| ;
14 | }
| ~
|
s305409861 | p00093 | C++ | #include <stdio.h>
void uruu(int a, int b);
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0093#
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
while (a != 0 || b != 0) {
uruu(a, b);
scanf("%d %d", &a, &b);
printf("\n");
}
return 0;
}
void uruu(int a, int b)
{
int count = 0;
for (int year = a; year <= b; ++year) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
++count;
} else {
if (year % 400 == 0) {
printf("%d\n", year);
++count;
}
}
}
}
if (count == 0) {
printf("NA\n");
}
} | a.cc:4:1: error: 'http' does not name a type
4 | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0093#
| ^~~~
|
s282910386 | p00093 | C++ | #include <stdio.h>
void uruu(int a, int b);
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
while (a != 0 || b != 0) {
uruu(a, b);
scanf("%d %d", &a, &b);
printf("\n")
}
return 0;
}
void uruu(int a, int b)
{
int count = 0;
for (int year = a; year <= b; ++year) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
++count;
} else {
if (year % 400 == 0) {
printf("%d\n", year);
++count;
}
}
}
}
if (count == 0) {
printf("NA\n");
}
} | a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before '}' token
13 | printf("\n")
| ^
| ;
14 | }
| ~
|
s314083582 | p00093 | C++ | #include <stdio.h>
void uruu(int a, int b);
int main(void)
{
int a;
int b;
scanf("%d %d", &a, &b);
while (a != 0 || b != 0) {
uruu(a, b);
printf("\n");
scanf("%d %d", &a, &b);
}
if (a == 0 && b == 0) {
printf("\n");
return 0;
}
void uruu(int a, int b)
{
int count = 0;
for (int year = a; year <= b; ++year) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
++count;
} else {
if (year % 400 == 0) {
printf("%d\n", year);
++count;
}
}
}
}
if (count == 0) {
printf("NA\n");
}
} | a.cc: In function 'int main()':
a.cc:22:1: error: a function-definition is not allowed here before '{' token
22 | {
| ^
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s365394163 | p00093 | C++ | #include<stdio.h>
void leap_year(int = x)
int main(void)
{
int start_year, end_year, check;
scanf(%d %d,&start_year, &end_year);
for(int i = start_year; i =<end_year; i++){
leap_year(i);
check += leap_year(i);
}
if(check = 0){
printf("NA");
}
return 0;
}
int leap_year(int = x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc:3:22: error: 'x' was not declared in this scope
3 | void leap_year(int = x)
| ^
a.cc:6:1: error: expected initializer before 'int'
6 | int main(void)
| ^~~
a.cc:21:21: error: 'x' was not declared in this scope
21 | int leap_year(int = x)
| ^
a.cc: In function 'int leap_year(int)':
a.cc:23:8: error: 'x' was not declared in this scope
23 | if(x % 4 = 0){
| ^
|
s744938686 | p00093 | C++ | #include<stdio.h>
void leap_year(int)
int main(void)
{
int start_year, end_year, check;
check = 0;
scanf(%d %d,&start_year, &end_year);
for(int i = start_year; i =<end_year; i++){
leap_year(i);
check += leap_year(i);
}
if(check = 0){
printf("NA");
}
return 0;
}
int leap_year(int = x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc:6:1: error: expected initializer before 'int'
6 | int main(void)
| ^~~
a.cc:22:21: error: 'x' was not declared in this scope
22 | int leap_year(int = x)
| ^
a.cc: In function 'int leap_year(int)':
a.cc:24:8: error: 'x' was not declared in this scope
24 | if(x % 4 = 0){
| ^
|
s060017744 | p00093 | C++ | #include<stdio.h>
void leap_year(int x);
int main(void)
{
int start_year, end_year, check;
check = 0;
scanf(%d %d,&start_year, &end_year);
for(int i = start_year; i =<end_year; i++){
leap_year(i);
check += leap_year(i);
}
if(check = 0){
printf("NA");
}
return 0;
}
int leap_year(int x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before '%' token
10 | scanf(%d %d,&start_year, &end_year);
| ^
a.cc:10:12: error: 'd' was not declared in this scope
10 | scanf(%d %d,&start_year, &end_year);
| ^
a.cc:11:32: error: expected primary-expression before '<' token
11 | for(int i = start_year; i =<end_year; i++){
| ^
a.cc:13:27: error: void value not ignored as it ought to be
13 | check += leap_year(i);
| ~~~~~~~~~^~~
a.cc: At global scope:
a.cc:22:5: error: ambiguating new declaration of 'int leap_year(int)'
22 | int leap_year(int x)
| ^~~~~~~~~
a.cc:3:6: note: old declaration 'void leap_year(int)'
3 | void leap_year(int x);
| ^~~~~~~~~
a.cc: In function 'int leap_year(int)':
a.cc:24:10: error: lvalue required as left operand of assignment
24 | if(x % 4 = 0){
| ~~^~~
|
s162787915 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
check = 0;
scanf(%d %d, &start_year, &end_year);
for(int i = start_year; i =< end_year; i++){
leap_year(i);
counter += leap_year(i);
}
if( counter = 0){
printf("NA");
}
return 0;
}
int leap_year(int x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'check' was not declared in this scope
9 | check = 0;
| ^~~~~
a.cc:10:11: error: expected primary-expression before '%' token
10 | scanf(%d %d, &start_year, &end_year);
| ^
a.cc:10:12: error: 'd' was not declared in this scope
10 | scanf(%d %d, &start_year, &end_year);
| ^
a.cc:11:32: error: expected primary-expression before '<' token
11 | for(int i = start_year; i =< end_year; i++){
| ^
a.cc: In function 'int leap_year(int)':
a.cc:24:10: error: lvalue required as left operand of assignment
24 | if(x % 4 = 0){
| ~~^~~
|
s121010638 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
counter = 0;
scanf(%d %d, &start_year, &end_year);
for(int i = start_year; i =< end_year; i++){
leap_year(i);
counter += leap_year(i);
}
if( counter = 0){
printf("NA");
}
return 0;
}
int leap_year(int x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before '%' token
10 | scanf(%d %d, &start_year, &end_year);
| ^
a.cc:10:12: error: 'd' was not declared in this scope
10 | scanf(%d %d, &start_year, &end_year);
| ^
a.cc:11:32: error: expected primary-expression before '<' token
11 | for(int i = start_year; i =< end_year; i++){
| ^
a.cc: In function 'int leap_year(int)':
a.cc:24:10: error: lvalue required as left operand of assignment
24 | if(x % 4 = 0){
| ~~^~~
|
s987434073 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
counter = 0;
scanf("%d %d", &start_year, &end_year);
for(int i = start_year; i =< end_year; i++){
leap_year(i);
counter += leap_year(i);
}
if( counter = 0){
printf("NA");
}
return 0;
}
int leap_year(int x)
{
if(x % 4 = 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:32: error: expected primary-expression before '<' token
11 | for(int i = start_year; i =< end_year; i++){
| ^
a.cc: In function 'int leap_year(int)':
a.cc:24:10: error: lvalue required as left operand of assignment
24 | if(x % 4 = 0){
| ~~^~~
|
s678231504 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
counter = 0;
while(1){
scanf("%d %d", &start_year, &end_year);
if(start_year == 0 && end_year == 0){
break;
}else{
for(int i = start_year; i <= end_year; i++){
leap_year(i);
counter += leap_year(i);
if( counter == 0){
printf("NA");
}
}
}
return 0;
}
int leap_year(int x)
{
if(x % 4 == 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:28:1: error: a function-definition is not allowed here before '{' token
28 | {
| ^
a.cc:34:2: error: expected '}' at end of input
34 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s067722453 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
while(1){
scanf("%d %d", &start_year, &end_year);
counter = 0;
if(start_year == 0 && end_year == 0){
break;
}else{
for(int i = start_year; i <= end_year; i++){
laep_year(i);
counter += leap_year(i);
}
if( counter == 0){
printf("NA");
}
}
}
return 0;
}
int leap_year(int x)
{
if((x % 4 == 0 && !(x % 100 == 0)) || x % 400 == 0){
printf("%d\n", x);
return 1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:17: error: 'laep_year' was not declared in this scope; did you mean 'leap_year'?
16 | laep_year(i);
| ^~~~~~~~~
| leap_year
|
s577375874 | p00093 | C++ | #include<stdio.h>
int leap_year(int x);
int main(void)
{
int start_year, end_year, counter;
while(1){
scanf("%d %d", &start_year, &end_year);
if(start_year == 0 && end_year == 0){
break;
}else{
counter = 0;
for(int i = start_year; i <= end_year; i++){
leap_year(i);
counter += leap_year(i);
}
if( counter == 0){
printf("NA");
}
}
}
return 0;
}
int leap_year(int x)
{
if((x % 4 == 0 && !(x % 100 == 0)) || x % 400 == 0){
printf("%d\n", x);
return 1;
}else
return 0;
}
} | a.cc:35:1: error: expected declaration before '}' token
35 | }
| ^
|
s779331625 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int leap_years_list[1000], int year_begin, int year_end);
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
}
int get_leap_years(int leap_years_count[1000], int year_begin, int year_end)
{
int k = 0;
for (int n = year_begin; n <= year_end ; n++) {
if ( is_leap_year(n) == false ) {
//false の時何も処理しない
} else {
leap_years_count[k] = n; //k番目のメモリに閏年の年を入力する
k++;
}
}
return k; //使ったメモリの数を返す
} | a.cc:69:14: error: extended character is not valid in an identifier
69 | return k; //使ったメモリの数を返す
| ^
a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:69:14: error: '\U00003000' was not declared in this scope
69 | return k; //使ったメモリの数を返す
| ^~
|
s519313062 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years();
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
}
int get_leap_years(int *leap_years_list, int year_begin, int year_end)
{
int count = 0;//閏年の個数を数える
for (int year = year_begin; year <= year_end; year++) {//閏年を配列に代入していく
if (is_leap_year(year)) {
leap_years_list[count] = year;
count++;
}
}
return count;
} | a.cc: In function 'int main()':
a.cc:26:46: error: too many arguments to function 'int get_leap_years()'
26 | int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:5: note: declared here
6 | int get_leap_years();
| ^~~~~~~~~~~~~~
|
s973169650 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int leap_years_list[1000], int year_begin, int year_end)
{
int count = 0;
while(int year = year_begin; year <= year_end; ++year) {
if (is_leap_year(year) != false) {
leap_years_list[count] = year;
++count;
}
}
return count;
}
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:9:32: error: expected ')' before ';' token
9 | while(int year = year_begin; year <= year_end; ++year) {
| ~ ^
| )
a.cc:9:34: error: 'year' was not declared in this scope
9 | while(int year = year_begin; year <= year_end; ++year) {
| ^~~~
|
s308223787 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int list[], int begin, int end);
int main(void)
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
int get_leap_years(int list[], int begin, int end)
{
int i;
for (int year = begin; year <= end; year++) {
if (is_leap_year(year)) {
i++
}
return i;
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:51:8: error: expected ';' before '}' token
51 | i++
| ^
| ;
52 | }
| ~
a.cc:57:1: error: a function-definition is not allowed here before '{' token
57 | {
| ^
a.cc:65:2: error: expected '}' at end of input
65 | }
| ^
a.cc:47:1: note: to match this '{'
47 | {
| ^
a.cc:65:2: warning: control reaches end of non-void function [-Wreturn-type]
65 | }
| ^
|
s969680695 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int list[], int begin, int end);
int main(void)
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
int get_leap_years(int list[], int begin, int end)
{
int i;
for (int year = begin; year <= end; year++) {
if (is_leap_year(year)) {
i++;
}
return i;
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:57:1: error: a function-definition is not allowed here before '{' token
57 | {
| ^
a.cc:65:2: error: expected '}' at end of input
65 | }
| ^
a.cc:47:1: note: to match this '{'
47 | {
| ^
a.cc:65:2: warning: control reaches end of non-void function [-Wreturn-type]
65 | }
| ^
|
s609813081 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int list[], int begin, int end);
int main(void)
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
int get_leap_years(int list[], int begin, int end)
{
int i;
for (int year = begin; year <= end; year++) {
if (is_leap_year(year)) {
list[i] = year
i++;
}
}
return i;
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:51:19: error: expected ';' before 'i'
51 | list[i] = year
| ^
| ;
52 | i++;
| ~
|
s667871588 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int list[], int begin, int end);
int main(void)
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
int get_leap_years(int list[], int begin, int end)
{
int j;
for (int year = begin; year <= end; year++) {
if (is_leap_year(year)) {
list[j] = year;
j++;
}
}
return i;
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:55:12: error: 'i' was not declared in this scope
55 | return i;
| ^
|
s830201664 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int* leap_years_list, int year_begin, int year_end)
{
int j = 0;
for (int i = year_begin, i < year_end + 1, i++) {
if (is_leap_year(i) == true) {
leap_years_list[j] = i;
j++;
}
}
return j;
}
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
} | a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:9:31: error: expected ';' before '<' token
9 | for (int i = year_begin, i < year_end + 1, i++) {
| ^~
| ;
a.cc:9:32: error: expected primary-expression before '<' token
9 | for (int i = year_begin, i < year_end + 1, i++) {
| ^
a.cc:9:51: error: expected ';' before ')' token
9 | for (int i = year_begin, i < year_end + 1, i++) {
| ^
| ;
|
s712348089 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int* leap_year_array, int start_year, int final_year);
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
}
int get_leap_years(int* leap_year_array, int start_year, int final_year)
{
for(int i = start_year; i <= final_year; i++){
if(is_leap_year(i)){
leap_year_array[count] = i;
count++;
}
}
return count + 1;
}
| a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:61:29: error: 'count' was not declared in this scope
61 | leap_year_array[count] = i;
| ^~~~~
a.cc:65:12: error: 'count' was not declared in this scope
65 | return count + 1;
| ^~~~~
|
s024645516 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool is_leap_year(int y);
int get_leap_years(int* ly_list, y_bgn, y_end);
int main()
{
int leap_years_list[1000]; //A.D. 0 - A.D. 3000 の間に閏年は高々1000個しかない
bool first_set = true; //一つ目のセットの前にだけは改行を入れてはいけないので
while (true) {
int year_begin, year_end;
//読み込み
scanf("%d %d", &year_begin, &year_end);
//終了判定
if (year_begin == 0 && year_end == 0) {
break;
}
//閏年を計算する
int leap_years_count = get_leap_years(leap_years_list, year_begin, year_end);
//セットとセットの間には空行を入れる
if (first_set) {
first_set = false;
} else {
putchar('\n'); //putcharは一文字だけ出力する関数です
}
//閏年を出力
if (leap_years_count == 0) {
puts("NA"); //putsは与えられた文字列を出力した後改行する関数です
} else {
for (int i = 0; i < leap_years_count; i++) {
printf("%d\n", leap_years_list[i]);
}
}
}
}
bool is_leap_year(int y)
{
if (y % 400 == 0) {
return true;
} else if (y % 100 == 0) {
return false;
} else {
return y % 4 == 0;
}
}
int get_leap_years(int* ly_list, y_bgn, y_end)
{
int count = 0;
for ( int ly = y_bgn; ly <= y_end; ly ++ ) {
if ( is_leap_year ( ly ) == true ) {
ly_list[count] = ly;
count ++;
}
}
return count;
} | a.cc:5:34: error: 'y_bgn' has not been declared
5 | int get_leap_years(int* ly_list, y_bgn, y_end);
| ^~~~~
a.cc:5:41: error: 'y_end' has not been declared
5 | int get_leap_years(int* ly_list, y_bgn, y_end);
| ^~~~~
a.cc:57:34: error: 'y_bgn' has not been declared
57 | int get_leap_years(int* ly_list, y_bgn, y_end)
| ^~~~~
a.cc:57:41: error: 'y_end' has not been declared
57 | int get_leap_years(int* ly_list, y_bgn, y_end)
| ^~~~~
a.cc: In function 'int get_leap_years(int*, int, int)':
a.cc:60:20: error: 'y_bgn' was not declared in this scope
60 | for ( int ly = y_bgn; ly <= y_end; ly ++ ) {
| ^~~~~
a.cc:60:33: error: 'y_end' was not declared in this scope
60 | for ( int ly = y_bgn; ly <= y_end; ly ++ ) {
| ^~~~~
|
s123789126 | p00093 | C++ |
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii;
typedef long long ll ;
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
int main(void){
int b,e;
bool fa=false;
while(cin >> b >> e , b+e){
if(fa)cout<<endl;
bool na=false;
loop(i,b,e){
if(!i%400){
cout<< i << endl;
count++;
}
if(i%100 && !i%4){
cout<<i<<endl;
na=true;
}
}
na?cout<<"NA"<<endl:;
}
} | a.cc: In function 'int main()':
a.cc:30:14: error: no post-increment operator for type
30 | count++;
| ^~
a.cc:37:25: error: expected primary-expression before ';' token
37 | na?cout<<"NA"<<endl:;
| ^
|
s882702272 | p00093 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include<iostream>
int main() {
int a,b;
while (true) {
scanf("%d%d", &a, &b);
if (a == 0&&b == 0) {
break;
}
bool isN = true;
for (int i=a;i<=b;++i){
if ((i%4==0)&&((i&100!=0)||(i&400==0)){
printf("%d\n", i);
isN = false;
}
if (isN) {
printf("NA\n");
}
printf("\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:51: error: expected ';' before '{' token
15 | if ((i%4==0)&&((i&100!=0)||(i&400==0)){
| ^
| ;
a.cc:20:13: error: expected primary-expression before 'if'
20 | if (isN) {
| ^~
a.cc:18:14: error: expected ')' before 'if'
18 | }
| ^
| )
19 |
20 | if (isN) {
| ~~
a.cc:15:16: note: to match this '('
15 | if ((i%4==0)&&((i&100!=0)||(i&400==0)){
| ^
|
s994662492 | p00093 | C++ | #include <stdio.h>
int main(void)
{
int a, b, year answer;
while(1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
}
answer = 0;
for (year = a; year <= b; year++) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
answer++;
} else if (year % 400 == 0) {
printf("%d\n", year);
answer++;
}
}
}
if (answer == 0) {
printf("NA\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:20: error: expected initializer before 'answer'
5 | int a, b, year answer;
| ^~~~~~
a.cc:11:9: error: 'answer' was not declared in this scope
11 | answer = 0;
| ^~~~~~
a.cc:12:14: error: 'year' was not declared in this scope
12 | for (year = a; year <= b; year++) {
| ^~~~
|
s817488971 | p00093 | C++ | #include <stdio.h>
int main(void)
{
int a, b, year answer;
while(1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
}
answer = 0;
for (year = a; year <= b; year++) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
answer++;
} else if (year % 400 == 0) {
printf("%d\n", year);
answer++;
}
}
}
if (answer == 0) {
printf("NA\n");
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:20: error: expected initializer before 'answer'
5 | int a, b, year answer;
| ^~~~~~
a.cc:11:9: error: 'answer' was not declared in this scope
11 | answer = 0;
| ^~~~~~
a.cc:12:14: error: 'year' was not declared in this scope
12 | for (year = a; year <= b; year++) {
| ^~~~
|
s894892059 | p00093 | C++ | #include <stdio.h>
int main(void)
{
int a, b, year, answer, i;
i = 0;
while(1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
}
if (i !=0) {
pritnf("\n");
i++;
answer = 0;
for (year = a; year <= b; year++) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
answer++;
} else if (year % 400 == 0) {
printf("%d\n", year);
answer++;
}
}
}
if (answer == 0) {
printf("NA\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
13 | pritnf("\n");
| ^~~~~~
| printf
a.cc:32:2: error: expected '}' at end of input
32 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s030065112 | p00093 | C++ | #include <stdio.h>
int main(void)
{
int a, b, year, answer, i;
i = 0;
while(1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
}
if (i != 0) {
pritnf("\n");
}
i++;
answer = 0;
for (year = a; year <= b; year++) {
if (year % 4 == 0) {
if (year % 100 != 0) {
printf("%d\n", year);
answer++;
} else if (year % 400 == 0) {
printf("%d\n", year);
answer++;
}
}
}
if (answer == 0) {
printf("NA\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
13 | pritnf("\n");
| ^~~~~~
| printf
|
s103235700 | p00093 | C++ | #include <stdio.h>
int uruu(int first, int end)
{
int count = 0;
for (int i = first; i < end + 1; i++)
{
if (i % 400 == 0) {
count = count + 1;
printf("%d\n", i);
} else if (i % 100 == 0) {
i = i + 3;
}else if (i % 4 == 0) {
printf("%d\n", i);
count = count + 1;
}
}
if (count == 0) {
printf("NA\n");
}
int main(void)
{
while (1) {
static int first, end;
scanf("%d %d", &first, &end);
if (first == 0 && end == 0) {
break;
} else {
uruu(first, end);
printf("\n");
}
}
} | a.cc: In function 'int uruu(int, int)':
a.cc:23:1: error: a function-definition is not allowed here before '{' token
23 | {
| ^
a.cc:34:2: error: expected '}' at end of input
34 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
a.cc:34:2: warning: no return statement in function returning non-void [-Wreturn-type]
34 | }
| ^
|
s074292260 | p00093 | C++ | #include <stdio.h>
int uruu(int first, int end)
{
int count = 0;
for (int i = first; i < end + 1; i++) {
if ((i % 400 != 0 && i % 100 == 0 && i - first <= 3 && end - i <= 3) || (first == end)) {
printf("NA\n");
count = count + 1;
}
if (i % 400 == 0) {
printf("%d\n", i);
count = count + 1;
} else if (i % 100 == 0) {
i = i + 3;
}else if (i % 4 == 0) {
printf("%d\n", i);
count = count + 1;
}
}
if (count == 0) {
printf("NA\n")
}
}
int main(void)
{
while (1) {
static int first, end;
scanf("%d %d", &first, &end);
if (first == 0 && end == 0) {
break;
} else {
uruu(first, end);
printf("\n");
}
}
} | a.cc: In function 'int uruu(int, int)':
a.cc:22:31: error: expected ';' before '}' token
22 | printf("NA\n")
| ^
| ;
23 | }
| ~
a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
24 | }
| ^
|
s875519869 | p00093 | C++ | include <stdio.h>
int uruu(int first, int end)
{
int count = 0;
for (int i = first; i < end + 1; i++) {
if (i % 400 == 0 && i % 100 != 0) {
printf("%d\n", i);
count = count + 1;
} else if (i % 100 == 0) {
i = i + 3;
} else if (i % 4 == 0) {
printf("%d\n", i);
count = count + 1;
}
}
if (count == 0) {
printf("NA\n");
}
}
int main(void)
{
while (1) {
static int first, end;
scanf("%d %d", &first, &end);
if (first == 0 && end == 0) {
break;
} else {
uruu(first, end);
printf("\n");
}
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:26:17: error: 'scanf' was not declared in this scope
26 | scanf("%d %d", &first, &end);
| ^~~~~
a.cc:30:25: error: 'uruu' was not declared in this scope
30 | uruu(first, end);
| ^~~~
a.cc:31:25: error: 'printf' was not declared in this scope
31 | printf("\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | include <stdio.h>
|
s718724225 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool judge(int year)
{
bool flag;
if (year % 400 == 0) {
flag = true;
} else if (year % 100 == 0) {
flag = false;
} else if (year % 4 == 0) {
flag = true;
}
return flag;
}
int main(void)
{
while (true) {
int x, y;
bool exist = false;
scanf("%d%d", &x, &y);
if (x == 0 && y == 0) {
break;
}
for (int i = x;i <= y; ++i) {
bool flag = judge(i)
if (flag == true) {
printf("%d\n", i);
exist = true;
}
}
if (exist == 0) {
printf("NA\n");
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:28:13: error: expected ',' or ';' before 'if'
28 | if (flag == true) {
| ^~
|
s491313397 | p00093 | C++ | #include <stdio.h>
#include <stdbool.h>
bool judge(int year)
{
bool flag;
if (year % 400 == 0) {
flag = true;
} else if (year % 100 == 0) {
flag = false;
} else if (year % 4 == 0) {
flag = true;
}
return flag;
}
int main(void)
{
while (true) {
int x, y;
bool exist = false;
scanf("%d%d", &x, &y);
if (x == 0 && y == 0) {
break;
}
for (int i = x;i <= y; ++i) {
bool flag = judge(i);
if (flag == true) {
printf("%d\n", i);
exist = true;
}
if (exist == 0) {
printf("NA\n");
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:39:2: error: expected '}' at end of input
39 | }
| ^
a.cc:18:1: note: to match this '{'
18 | {
| ^
|
s702207965 | p00093 | C++ | #include <stdio.h>
void uru(int year);
int main(void)
{
int a, b;
int year;
int j;
while (true) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
} else {
for (year = a; year < b; ++year) {
uru(year);
}
} else if (j == 0) {
printf("NA\n");
}
return 0;
}
void uru(int year)
{
int j = 0;
int R4, R100, R400;
R4 = year % 4;
R100 = year % 100;
R400 = year % 400;
if (R4 == 0 && R100 != 0) {
printf("%d\n", year);
++j;
} else if (R400 == 0) {
printf("%d\n", year);
++j;
}
} | a.cc: In function 'int main()':
a.cc:18:7: error: 'else' without a previous 'if'
18 | } else if (j == 0) {
| ^~~~
a.cc:25:1: error: a function-definition is not allowed here before '{' token
25 | {
| ^
a.cc:38:2: error: expected '}' at end of input
38 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s253488870 | p00093 | C++ | File Edit Options Buffers Tools C Help
#include <stdio.h>
int main(void)
{
int start, finish;
int exist;
while(1){
exist = 0;
scanf("%d %d", &start, &finish);
if (start == 0 && finish == 0) {
break;
}
for(; start <= finish; start++) {
if((start % 4 == 0 && start % 100 != 0) || start % 400 == 0) {
printf("%d\n", start);
++exist;
}
}
if (exist == 0) {
printf("NA\n");
}
}
return 0;
} | a.cc:1:1: error: 'File' does not name a type
1 | File Edit Options Buffers Tools C Help
| ^~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf' was not declared in this scope
9 | scanf("%d %d", &start, &finish);
| ^~~~~
a.cc:15:13: error: 'printf' was not declared in this scope
15 | printf("%d\n", start);
| ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
2 | #include <stdio.h>
+++ |+#include <cstdio>
3 | int main(void)
a.cc:20:13: error: 'printf' was not declared in this scope
20 | printf("NA\n");
| ^~~~~~
a.cc:20:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s508348978 | p00093 | C++ | #include <stdio.h>
const int year[4] = {1868, 1912, 1926, 1989};
const int month[4] = {9, 7, 12, 1};
const int day[4] = {8, 30, 25, 8};
const char gengou[5] = {'p', 'm', 't', 's', 'h'};//??????pre-meiji, meiji, taisyou, syowa, heisei??¨??????
char gengouka (int inputyear, int inputmonth, int inputday)
{
int i;
char y;//y?????????????????????????????????
for (i = 0; i < 3; ++i) {
if (inputyear == year[i]) {//?¢?????????´?????¨????????????
if (inputmonth == month[i]) {
if (inputday < day[i]) {
y = gengou[i];
break;
} else {
y = gengou[i + 1];
break;
}
} else if (inputmonth < month[i]) {
y = gengou[i];
break;
} else {
y = gengou[i + 1];
break;
}
break;
} else if (inputyear < year[i]) {
y = gengou[i];
break;
}
if (inputyear > year[3]) {//???????????????????????§??????
y = gengou[4];
break;
}
}
return y;
}
int main(void)
{
int inputyear, inputmonth, inputday, outputyear;
??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
char y = gengouka(inputyear, inputmonth, inputday);
if (y == 'p') {
printf("pre-meiji\n");
} else if (y == 'm') {
outputyear = inputyear - year[0] + 1;
printf("meiji %d %d %d\n", outputyear, inputmonth, inputday);
} else if (y == 't') {
outputyear = inputyear - year[1] + 1;
printf("taisho %d %d %d\n", outputyear, inputmonth, inputday);
} else if (y == 's') {
outputyear = inputyear - year[2] + 1;
printf("syowa %d %d %d\n", outputyear, inputmonth, inputday);
} else {
outputyear = inputyear - year[3] + 1;
printf("heisei %d %d %d\n", outputyear, inputmonth, inputday);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:46:1: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:2: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:3: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:4: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:5: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:6: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
|
s824364513 | p00093 | C++ | #include <stdio.h>
const int year[4] = {1868, 1912, 1926, 1989};
const int month[4] = {9, 7, 12, 1};
const int day[4] = {8, 30, 25, 8};
const char gengou[5] = {'p', 'm', 't', 's', 'h'};//??????pre-meiji, meiji, taisyou, syowa, heisei??¨??????
char gengouka (int inputyear, int inputmonth, int inputday)
{
int i;
char y;//y?????????????????????????????????
for (i = 0; i < 3; ++i) {
if (inputyear == year[i]) {//?¢?????????´?????¨????????????
if (inputmonth == month[i]) {
if (inputday < day[i]) {
y = gengou[i];
break;
} else {
y = gengou[i + 1];
break;
}
} else if (inputmonth < month[i]) {
y = gengou[i];
break;
} else {
y = gengou[i + 1];
break;
}
break;
} else if (inputyear < year[i]) {
y = gengou[i];
break;
}
if (inputyear > year[3]) {//???????????????????????§??????
y = gengou[4];
break;
}
}
return y;
}
int main(void)
{
int inputyear, inputmonth, inputday, outputyear;
??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
char y = gengouka(inputyear, inputmonth, inputday);
if (y == 'p') {
printf("pre-meiji\n");
} else if (y == 'm') {
outputyear = inputyear - year[0] + 1;
printf("meiji %d %d %d\n", outputyear, inputmonth, inputday);
} else if (y == 't') {
outputyear = inputyear - year[1] + 1;
printf("taisho %d %d %d\n", outputyear, inputmonth, inputday);
} else if (y == 's') {
outputyear = inputyear - year[2] + 1;
printf("syowa %d %d %d\n", outputyear, inputmonth, inputday);
} else {
outputyear = inputyear - year[3] + 1;
printf("heisei %d %d %d\n", outputyear, inputmonth, inputday);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:46:1: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:2: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:3: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:4: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:5: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:6: error: expected primary-expression before '?' token
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
a.cc:46:7: error: expected ':' before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
| :
a.cc:46:7: error: expected primary-expression before 'while'
46 | ??????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) {
| ^~~~~
|
s248610540 | p00093 | C++ | #include <iostream>
using namespace std;
#include <algorithm>
#include <stdio.h>
int main(void)
{
int a[100], b[100], i = 0, j, k;
bool flag = false;
while (1){
scanf_s("%d %d", &a[i], &b[i]);
if (a[i] == 0 && b[i] == 0) break;
if (a[i] % 400 < 400 - 4){ a[i] += 4 - (a[i] % 4); }
i++;
}
for (j = 0; j <= i; j++){
if (j != 0) { printf("\n"); }
for (k = a[j]; k < b[j];k+=4){
if (k % 100 == 0){
if (k % 400 == 0) {
printf("%d\n", k);
flag = true;
}
}
else {
printf("%d\n", k);
if (k % 400 > 400 - 4){
printf( "%d\n", k + (400 - (k % 400)) );
}
flag = true;
}
}
if (flag == false) { printf("NA\n"); }
flag = false;
}
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | scanf_s("%d %d", &a[i], &b[i]);
| ^~~~~~~
| scanf
|
s125147495 | p00093 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int fiyear,finyear,co=0;
while(cin>>fiyear>>finyear&&fiyear!=0&&finyear!=0){
for(int i=0;(fiyear+i)=<finyear;i++){
if((fiyear+i)%4==0){
co=1;
if((fiyear+i)%100!=0||(fiyear+i)%400==0)cout<<fiyear+i<<endl;
}
}
if(co==0)cout<<"NA"<<endl;
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:32: error: expected primary-expression before '<' token
7 | for(int i=0;(fiyear+i)=<finyear;i++){
| ^
|
s020448883 | p00093 | C++ | #include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int t=0;
while(1){
int a,b;
cin>>a>>b;
if(a==0&&b==0)break;
if(!)puts("");
int fg=0;
for(int i=a;i<=b;i++){
if(!(i%400)){
cout<<i<<endl;
fg=1;
}
else if(!(i%100))continue;
else if(!(i%4)){
cout<<i<<endl;
fg=1;
}
}
if(!fg)cout<<"NA"<<endl;
t++;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before ')' token
12 | if(!)puts("");
| ^
|
s725600000 | p00093 | C++ | #include <iostream>
bool inputValCheck(int input_n1, input_n2);
void printLeapYear(int start_y, int end_y);
bool isLeapYear(int year);
int main()
{
int start_year, end_year;
std::cin >> start_year >> end_year;
if (inputValCheck(start_year, end_year)) {
printLeapYear(start_year, end_year);
}
return 0;
}
bool inputValCheck(int input_n1, int input_n2);
{
if (input_n1 <= 0 || input_n1 > input_n2 || input_n2 >= 1000) {
return false;
}
return true;
}
bool isLeapYear(int year)
{
if (year % 400 == 0) {
return true;
} else if (year % 100 == 0) {
return false;
} else if (year % 4 == 0) {
return true;
} else {
return false;
}
}
void printLeapYear(int start_y, int end_y)
{
bool is_leap_year = false;
for (int i = start_y; i <= end_y; i++) {
if (isLeapYear(i) == true) {
std::cout << i << std::endl;
}
}
} | a.cc:3:34: error: 'input_n2' has not been declared
3 | bool inputValCheck(int input_n1, input_n2);
| ^~~~~~~~
a.cc:19:1: error: expected unqualified-id before '{' token
19 | {
| ^
|
s175124547 | p00093 | C++ | #include <iostream>
bool inputValCheck(int input_n1, int input_n2);
void printLeapYear(int start_y, int end_y);
bool isLeapYear(int year);
int main()
{
int start_year, end_year;
std::cin >> start_year >> end_year;
if (inputValCheck(start_year, end_year)) {
printLeapYear(start_year, end_year);
}
return 0;
}
bool inputValCheck(int input_n1, int input_n2);
{
if (input_n1 <= 0 || input_n1 > input_n2 || input_n2 >= 1000) {
return false;
}
return true;
}
bool isLeapYear(int year)
{
if (year % 400 == 0) {
return true;
} else if (year % 100 == 0) {
return false;
} else if (year % 4 == 0) {
return true;
} else {
return false;
}
}
void printLeapYear(int start_y, int end_y)
{
bool is_leap_year = false;
for (int i = start_y; i <= end_y; i++) {
if (isLeapYear(i) == true) {
std::cout << i << std::endl;
}
}
} | a.cc:19:1: error: expected unqualified-id before '{' token
19 | {
| ^
|
s775490376 | p00093 | C++ | include <iostream>
bool ifEndValInput(int input_n1, int input_n2);
bool inputValRangeCheck(int input_n1, int input_n2);
void printLeapYear(int start_y, int end_y);
bool isLeapYear(int year);
int main()
{
int start_year, end_year;
while (true) {
std::cin >> start_year >> end_year;
if (ifEndValInput(start_year, end_year)) {
break;
}
if (inputValRangeCheck(start_year, end_year)) {
printLeapYear(start_year, end_year);
}
}
return 0;
}
bool ifEndValInput(int input_n1, int input_n2)
{
if (input_n1 == 0 && input_n2 == 0) {
return true;
}
return false;
}
bool inputValRangeCheck(int input_n1, int input_n2)
{
if (input_n1 <= 0 || input_n1 > input_n2 || input_n2 >= 1000) {
return false;
}
return true;
}
bool isLeapYear(int year)
{
if (year % 400 == 0) {
return true;
} else if (year % 100 == 0) {
return false;
} else if (year % 4 == 0) {
return true;
} else {
return false;
}
}
void printLeapYear(int start_y, int end_y)
{
bool is_leap_year = false;
for (int i = start_y; i <= end_y; i++) {
if (isLeapYear(i) == true) {
std::cout << i << std::endl;
}
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:13:14: error: 'cin' is not a member of 'std'
13 | std::cin >> start_year >> end_year;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | include <iostream>
a.cc:14:13: error: 'ifEndValInput' was not declared in this scope
14 | if (ifEndValInput(start_year, end_year)) {
| ^~~~~~~~~~~~~
a.cc: In function 'void printLeapYear(int, int)':
a.cc:59:18: error: 'cout' is not a member of 'std'
59 | std::cout << i << std::endl;
| ^~~~
a.cc:59:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:59:36: error: 'endl' is not a member of 'std'
59 | std::cout << i << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | include <iostream>
|
s787678443 | p00093 | C++ | #include <iostream>
#include <stdio.h>
bool judge(int year);
int main()
{
int a, b;
while (true) {
int check = 0;
std::cin >> a >> b;
if (start == 0 && end == 0) {
break;
}
for (int i = a; i <= b; i++) {
if (judge(i)) {
std::cout << i << std::endl;
check = 1;
}
}
if (check == 0) {
std::cout << "NA" << std::endl;
}
std::cout << std::endl;
}
return 0;
}
bool judge(int year){
if ((year % 4 == 0 && !(year % 100 == 0)) || year % 400 == 0) {
return true;
} else {
return false;
}
} | a.cc: In function 'int main()':
a.cc:14:21: error: 'start' was not declared in this scope
14 | if (start == 0 && end == 0) {
| ^~~~~
a.cc:14:35: error: 'end' was not declared in this scope; did you mean 'std::end'?
14 | if (start == 0 && end == 0) {
| ^~~
| std::end
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
|
s894183446 | p00093 | C++ | #include <iostream>
bool judge(int year);
int main()
{
int start, end;
while (true) {
int check = 0;
std::cin >> start >> end;
std::cout << std::endl;
if (start == 0 && end == 0) {
break;
}
for (int i = start; i <= end; i++) {
if (judge(i)) {
std::cout << i << std::endl;
check = 1;
}
}
if (check == ) {
std::cout << "NA" << std::endl;
}
}
return 0;
}
bool judge(int year){
if ((year % 4 == 0 && !(year % 100 == 0)) || year % 400 == 0) {
return true;
} else {
return false;
}
} | a.cc: In function 'int main()':
a.cc:28:30: error: expected primary-expression before ')' token
28 | if (check == ) {
| ^
|
s341052137 | p00093 | C++ | #include <iostream>
bool judgeUruyear(int year)
{
if (year % 400 == 0) {
return true;
} else if (year % 100 == 0) {
return false;
} else if (year % 4 == 0) {
return true;
} else {
return false;
}
}
//int flag = 0;
void printUruyear(int year_begin, int year_end)
{
// if(flag == 1){
std::cout << std::endl;
//}
flag = 1;
int count_year = 0;
// kono for loop no jyouken-siki ha "=" hituyou
for (int i = year_begin; i <= year_end; i++) {
if (judgeUruyear(i)) {
count_year += 1;
std::cout << i << std::endl;
}
}
if (count_year == 0) {
std::cout << "NA" << std::endl;
}
}
int main()
{
int year_begin, year_end;
while (true) {
std::cin >> year_begin >> year_end;
if (year_begin == 0 && year_end == 0) {
break;
}
printUruyear(year_begin, year_end);
}
return 0;
}
// http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=1877346#1 | a.cc: In function 'void printUruyear(int, int)':
a.cc:26:5: error: 'flag' was not declared in this scope
26 | flag = 1;
| ^~~~
|
s259801505 | p00093 | C++ | include <iostream>
void leapYear(int, int);
int main()
{
while (true) {
int a, b;
std::cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
leapYear(a, b);
std::cout << std::endl;
}
return 0;
}
void leapYear(int a, int b)
{
int i = 0;
for (int year = a; year <= b; ++year) {
if ((year % 4 == 0 && year % 100 !=0) || (year % 400 == 0)) {
std::cout << year <<std::endl;
++i;
}
}
if (i == 0) {
std::cout << "NA" <<std::endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:14: error: 'cin' is not a member of 'std'
8 | std::cin >> a >> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | include <iostream>
a.cc:12:9: error: 'leapYear' was not declared in this scope
12 | leapYear(a, b);
| ^~~~~~~~
a.cc:13:14: error: 'cout' is not a member of 'std'
13 | std::cout << std::endl;
| ^~~~
a.cc:13:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:27: error: 'endl' is not a member of 'std'
13 | std::cout << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | include <iostream>
a.cc: In function 'void leapYear(int, int)':
a.cc:22:18: error: 'cout' is not a member of 'std'
22 | std::cout << year <<std::endl;
| ^~~~
a.cc:22:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:38: error: 'endl' is not a member of 'std'
22 | std::cout << year <<std::endl;
| ^~~~
a.cc:22:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:27:14: error: 'cout' is not a member of 'std'
27 | std::cout << "NA" <<std::endl;
| ^~~~
a.cc:27:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:34: error: 'endl' is not a member of 'std'
27 | std::cout << "NA" <<std::endl;
| ^~~~
a.cc:27:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s119359293 | p00093 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
bool isLeap(int i);
int main()
{
int a, b;
bool flag = false;
while (cin >> a >> b, a || b) {
bool fl = false;
if (flag) {
puts("");
} else {
flag = true;
}
for (int i = a; i <= b; i++) {
if (isLeap(i)) {
fl = true;
cout << i << '\n';
}
}
if (!fl) {
puts("NA");
}
}
return 0;
}
bool isLeap(int i)
{
if (!(i % 400) ) {
return true;
} else if (!(i % 100) ) {
return false;
} else if (!(i % 4) ) {
return true;
} else {
return false;
} | a.cc: In function 'bool isLeap(int)':
a.cc:42:6: error: expected '}' at end of input
42 | }
| ^
a.cc:33:1: note: to match this '{'
33 | {
| ^
|
s792473388 | p00093 | C++ | #include <iostream>
int main() {
int a, b, n = 0;
std::cin >> a >> b;
while (a????????????0 && b != 0) {
for (int i = a, i <= b, ++i) {
if (i % 400 == 0) {
std::cout << i << std::endl;
n += 1;
} else if (i % 100 != 0 && i % 4 == 0) {
std::cout << i << std::endl;
n += 1;
} else {
continue;
}
}
if (n == 0) {
std::cout << "NA" << std::endl;
}
std::cin >> a >> b;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:14: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:15: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:16: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:17: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:18: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:19: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:20: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:21: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:22: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:23: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:24: error: expected primary-expression before '?' token
6 | while (a????????????0 && b != 0) {
| ^
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:6:36: error: expected ':' before ')' token
6 | while (a????????????0 && b != 0) {
| ^
| :
a.cc:6:36: error: expected primary-expression before ')' token
a.cc:7:26: error: expected ';' before '<=' token
7 | for (int i = a, i <= b, ++i) {
| ^~~
| ;
a.cc:7:27: error: expected primary-expression before '<=' token
7 | for (int i = a, i <= b, ++i) {
| ^~
a.cc:7:36: error: expected ';' before ')' token
7 | for (int i = a, i <= b, ++i) {
| ^
| ;
|
s327464770 | p00093 | C++ | #include <iostream>
int main() {
int a, b, n = 0;
std::cin >> a >> b;
while (a != 0 && b != 0) {
for (int i = a; i <= b; ++i) {
if (i % 400 == 0) {
std::cout << i << std::endl;
n += 1;
} else if (i % 100 != 0 && i % 4 == 0) {
std::cout << i << std::endl;
n += 1;
} else {
continue;
}
}
if (n == 0) {
std::cout << "NA" << std::endl;
}
std::endl;
std::cin >> a >> b;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:18: error: statement cannot resolve address of overloaded function
21 | std::endl;
| ^
|
s283151058 | p00093 | C++ | #include <iostream>
int main() {
int a, b, n = 0;
std::cin >> a >> b;
while (a != 0 && b != 0) {
for (int i = a; i <= b; ++i) {
if (i % 400 == 0) {
std::cout << i << std::endl;
n += 1;
} else if (i % 100 != 0 && i % 4 == 0) {
std::cout << i << std::endl;
n += 1;
} else {
continue;
}
}
if (n == 0) {
std::cout << "NA" << std::endl;
}
std::endl;
std::cin >> a >> b;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:18: error: statement cannot resolve address of overloaded function
21 | std::endl;
| ^
|
s456118243 | p00093 | C++ | #include <iostream>
using namespace std;
bool uru[3000];
void q93() {
memset(uru, 0, sizeof(uru));
for (int i = 0; i < 3000; i += 4) {
uru[i] = true;
}
for (int i = 0; i < 3000; i += 100) {
uru[i] = false;
}
for (int i = 0; i < 3000; i += 400) {
uru[i] = true;
}
int a, b;
for (; cin >> a >> b;) {
if (!a) break;
bool print_flag = false;
for (int i = a; i < b; i++) {
if (uru[i]) {
cout << i << endl;
print_flag = true;
}
}
if (!print_flag) cout << "NA" << endl;
cout << endl;
}
}
int main() {
q93();
return 0;
} | a.cc: In function 'void q93()':
a.cc:8:9: error: 'memset' was not declared in this scope
8 | memset(uru, 0, sizeof(uru));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 |
|
s003426909 | p00093 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
con >>a>>b;
for(int i=a;i<b+1;i++){
if(i%4==0){
ans += 1
}
if(i%100==0){
ans -= 1
}
if(i%400==0){
ans += 1
}
}
if(ans == 0){
cout <<"NA"<<endl;
}else{
cout <<ans<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'con' was not declared in this scope; did you mean 'cos'?
6 | con >>a>>b;
| ^~~
| cos
a.cc:9:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | ans += 1
| ^~~
| abs
a.cc:12:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | ans -= 1
| ^~~
| abs
a.cc:15:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | ans += 1
| ^~~
| abs
a.cc:18:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
18 | if(ans == 0){
| ^~~
| abs
|
s839020999 | p00093 | C++ | int a, b;
while (cin >> a >> b && a != 0 && b != 0) {
int p = 1;
if (p) {
cout << endl;
p = 0;
}
int flag = 1;
for (int i = a; i <= b; i++) {
if (i % 100 == 0 && i % 400 != 0) {
// continue;
} else if (i % 4 == 0 && i % 100 != 0) {
cout << i << endl;
flag = 0;
} else if (i % 400 == 0) {
cout << i << endl;
flag = 0;
} else {
// continue;
}
}
if (flag) {
cout << "NA" << endl;
}
}
return 0;
}
| a.cc:2:1: error: expected unqualified-id before 'while'
2 | while (cin >> a >> b && a != 0 && b != 0) {
| ^~~~~
a.cc:26:1: error: expected unqualified-id before 'return'
26 | return 0;
| ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s391143007 | p00093 | C++ | #include <bits/stdc++.h>
#define stirng string
#define vvi vector<vector<int>>
#define vi vector<int>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int inf = 1e9 + 7;
/*int main() {
string a;
cin >> a;
string s = "";
for (int i = 0; i < 10; i++) {
s += a[i];
}
for (int i = 0; i < 44; i++) {
int t = s[0 + i] - '0';
int u = s[1 + i] - '0';
s += (t + u) % 10 + '0';
}
cout << s[54] << endl;
return 0;
}*/
int a, b;
while (cin >> a >> b && a != 0 && b != 0) {
int p = 1;
if (p) {
cout << endl;
p = 0;
}
int flag = 1;
for (int i = a; i <= b; i++) {
if (i % 100 == 0 && i % 400 != 0) {
// continue;
} else if (i % 4 == 0 && i % 100 != 0) {
cout << i << endl;
flag = 0;
} else if (i % 400 == 0) {
cout << i << endl;
flag = 0;
} else {
// continue;
}
}
if (flag) {
cout << "NA" << endl;
}
}
return 0;
}
| a.cc:27:1: error: expected unqualified-id before 'while'
27 | while (cin >> a >> b && a != 0 && b != 0) {
| ^~~~~
a.cc:51:1: error: expected unqualified-id before 'return'
51 | return 0;
| ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
52 | }
| ^
|
s449706358 | p00093 | C++ | #include <iostream>
using namespace std;
bool isLeapYear(int y){
return ( year%4 == 0 && year%100 != 0 || year%400 == 0 )? true : false ;
}
int main(){
int a,b;
bool flag, iniFlag = true;
while( cin >> a >> b , a || b ){
flag = true;
if( iniFlag == false ){
cout << endl;
}else{
iniFlag = false;
}
for(int i=a ; i<=b ; i++){
if( isLeapYear(i) ){
flag = false;
cout << i << endl;
}
}
if( flag ) cout << "NA" << endl;
}
} | a.cc: In function 'bool isLeapYear(int)':
a.cc:5:14: error: 'year' was not declared in this scope
5 | return ( year%4 == 0 && year%100 != 0 || year%400 == 0 )? true : false ;
| ^~~~
|
s837974779 | p00093 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
int a, b;
vector <int> hoge, leap;
while (1) {
cin >> a >> b;
if (a == 0 && b == 0)
break;
hoge.push_back(a);
hoge.push_back(b);
}
for (int i = 0; i < hoge.size(); i += 2) {
for (int j = hoge[i]; j <= hoge[i+1]; j++)
if (j % 400 == 0 || (j % 100 && j % 4 == 0))
leap.push_back(j);
if (!leap.empty()) {
for (int j = 0; j < leap.size(); j++)
cout << leap[j] << endl;
erase(leap.begin(), leap.end());
} else {
cout << "NA" << endl;
}
cout << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:25:7: error: 'erase' was not declared in this scope
25 | erase(leap.begin(), leap.end());
| ^~~~~
|
s313618298 | p00093 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int a,b,k=0,i,j=0;
while(1){
cin>>a>>b;
if(a==0&&b==0)break;
if(j) cout<<endl;
k=0;
for(i=a;i<=b;i++){
if(i%4==0&&i%100!=0){cout<<i<<endl;k++;}
if(i%400==0){cout<<i<<endl;k++}
}
if(k==0)cout<<"NA"<<endl;
j=1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:37: error: expected ';' before '}' token
16 | if(i%400==0){cout<<i<<endl;k++}
| ^
| ;
|
s041146421 | p00093 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int i, a, b, leap, count=0;
vector<int> leapyear;
while(1){
cin >> a >> b;
if(a == 0 && b == 0) break;
else if(count != 0) cout << endl;
for(i=a; i<=b; ++i){
if(i%400 == 0)
leap = 1;
else if(i%100 == 0)
leap = 0;
else if(i%4 == 0)
leap = 1;
else
leap = 0;
if(leap == 1)
leapyear.push_back(i);
}
if(leapyear.size() == 0){
cout << "NA" << endl;
}else{
for(vector<int>::size_type i=0; i != leapyear.size(); ++i)
cout << leapyear[i] << endl;
}
leapyear.clear();
++count;
} | a.cc: In function 'int main()':
a.cc:38:4: error: expected '}' at end of input
38 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s996723525 | p00093 | C++ |
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main {
int INF = 1 << 28;
void run() {
Scanner sc = new Scanner(System.in);
while(true) {
int a = sc.nextInt();
int b = sc.nextInt();
if( a == 0 && b == 0) break;
LinkedList<Integer> ans = new LinkedList<Integer>();
for(int i=a;i<=b;i++) {
if(i%400 == 0) ans.add(i);
else if(i%100 != 0 && i%4 == 0) ans.add(i);
}
if(ans.isEmpty()) System.out.println("NA");
else {
for(int i:ans) {
System.out.println(i);
}
}
System.out.println();
}
}
public static void main(String[] args) {
new Main().run();
}
} | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import static java.lang.Math.*;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import static java.util.Arrays.*;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: expected unqualified-id before 'public'
7 | public class Main {
| ^~~~~~
|
s925460363 | p00093 | C++ | #include <stdio.h>
int main(){
scanf("%d%d",&a,&b);
while(1){
int a,b;
int i,sum=0;
for(i=a;i<=b;i++){
if(i%400==0){
printf("%d\n",i); sum++;
}else if(i%100==0){
continue;
}else if(i%4==0){
printf("%d\n",i);sum++;
}}
if(sum==0) printf("NA\n");
sum=0;
scanf("%d%d",&a,&b);
if(a==0 && b==0) break;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:25: error: 'a' was not declared in this scope
3 | scanf("%d%d",&a,&b);
| ^
a.cc:3:28: error: 'b' was not declared in this scope
3 | scanf("%d%d",&a,&b);
| ^
|
s649150947 | p00093 | C++ | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args){
BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
try{
boolean flag, flag2=true;
while(true){
String[] xt = sc.readLine().split(" ");
int a = Integer.valueOf(xt[0]);
int b = Integer.valueOf(xt[1]);
if(a==0 && b==0)
break;
flag = false;
if(!flag2) System.out.println();
for(int i=a; i<=b; i++)
if(i%4==0){
if(i%400==0){
System.out.println(i);
flag = true;
}
else if(i%100==0)
;
else{
System.out.println(i);
flag = true;
}
}
if(!flag)
System.out.println("NA");
flag2=false;
}
}catch (Exception e){
System.out.println("Error");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:11: error: expected ':' before 'static'
5 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:5:29: error: 'String' has not been declared
5 | public static void main(String[] args){
| ^~~~~~
a.cc:5:38: error: expected ',' or '...' before 'args'
5 | public static void main(String[] args){
| ^~~~
a.cc:38:2: error: expected ';' after class definition
38 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'BufferedReader' was not declared in this scope
6 | BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
| ^~~~~~~~~~~~~~
a.cc:8:13: error: 'boolean' was not declared in this scope; did you mean 'bool'?
8 | boolean flag, flag2=true;
| ^~~~~~~
| bool
a.cc:10:17: error: 'String' was not declared in this scope
10 | String[] xt = sc.readLine().split(" ");
| ^~~~~~
a.cc:10:24: error: expected primary-expression before ']' token
10 | String[] xt = sc.readLine().split(" ");
| ^
a.cc:11:25: error: 'Integer' was not declared in this scope
11 | int a = Integer.valueOf(xt[0]);
| ^~~~~~~
a.cc:11:41: error: 'xt' was not declared in this scope
11 | int a = Integer.valueOf(xt[0]);
| ^~
a.cc:15:17: error: 'flag' was not declared in this scope
15 | flag = false;
| ^~~~
a.cc:16:21: error: 'flag2' was not declared in this scope
16 | if(!flag2) System.out.println();
| ^~~~~
a.cc:16:28: error: 'System' was not declared in this scope
16 | if(!flag2) System.out.println();
| ^~~~~~
a.cc:20:29: error: 'System' was not declared in this scope
20 | System.out.println(i);
| ^~~~~~
a.cc:26:29: error: 'System' was not declared in this scope
26 | System.out.println(i);
| ^~~~~~
a.cc:31:21: error: 'System' was not declared in this scope
31 | System.out.println("NA");
| ^~~~~~
a.cc:32:17: error: 'flag2' was not declared in this scope
32 | flag2=false;
| ^~~~~
a.cc:34:17: error: 'Exception' does not name a type
34 | }catch (Exception e){
| ^~~~~~~~~
a.cc:35:13: error: 'System' was not declared in this scope
35 | System.out.println("Error");
| ^~~~~~
|
s019167345 | p00093 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
while(1){
cin >> a >> b; 
if(a ==0 && b == 0) return 0;
int k = 0;
for(int i = a;;i++){
if(i % 4 == 0){
a = i; break;
}
}
for(int i = a ;i<=b;){
if(i % 100 == 0){
if(i % 400 == 0){
cout << i << endl; k++;
}
} else if(i % 4 == 0){
cout << i << endl; k++;
}
i+=4;
}
if(k ==0) cout << "NA" << endl ;
cout << endl;
}
} | a.cc:6:24: error: stray '#' in program
6 | cin >> a >> b; 
| ^
a.cc: In function 'int main()':
a.cc:6:25: error: lvalue required as unary '&' operand
6 | cin >> a >> b; 
| ^~~
|
s379163536 | p00093 | C++ |
#include<iostream>
using namespace std;
int main(){
int a,b;
while(1){
cin >> a >> b;
if(a ==0 && b == 0) return 0;
int k = 0;
for(int i = a;;i++){
if(i % 4 == 0){
a = i; break;
}
}
for(int i = a ;i<=b;){
if(i % 100 == 0){
if(i % 400 == 0){
cout << i << endl; k++;
}
} else if(i % 4 == 0){
cout << i << endl; k++;
}
i+=4;
}
if(k ==0) cout << "NA" << endl ;
cout << endl;
} | a.cc: In function 'int main()':
a.cc:32:18: error: expected '}' at end of input
32 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s837976174 | p00093 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
while(1){
cin >> a >> b; 
if(a ==0 && b == 0) return 0;
int k = 0;
for(int i = a;;i++){
if(i % 4 == 0){
a = i; break;
}
}
for(int i = a ;i<=b;){
if(i % 100 == 0){
if(i % 400 == 0){
cout << i << endl; k++;
}
} else if(i % 4 == 0){
cout << i << endl; k++;
}
i+=4;
}
if(k ==0) cout << "NA" << endl ;
cout << endl;
}
} | a.cc:6:24: error: stray '#' in program
6 | cin >> a >> b; 
| ^
a.cc: In function 'int main()':
a.cc:6:25: error: lvalue required as unary '&' operand
6 | cin >> a >> b; 
| ^~~
|
s639101359 | p00093 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
while(1){
cin >> a >> b; 
cout << endl;
if(a ==0 && b == 0) return 0;
int k = 0;
for(int i = a ;i<=b;i++){
if(i % 100 == 0){
if(i % 400 == 0){
cout << i << endl; k++;
}
} else if(i % 4 == 0){
cout << i << endl; k++;
}
}
if(k ==0) cout << "NA" << endl ;
}
} | a.cc:6:24: error: stray '#' in program
6 | cin >> a >> b; 
| ^
a.cc: In function 'int main()':
a.cc:6:25: error: lvalue required as unary '&' operand
6 | cin >> a >> b; 
| ^~~
|
s440457250 | p00094 | Java |
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
double c = 3.305785;
System.out.println(a * b / c);
}
} | Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s300966598 | p00094 | Java | import java.util.Scanner;
//Calculation of Area
public class Main {
void run(){
Scanner sc = new Scanner(System.in);
System.out.printf("%.8f\n", sc.nextInt()*sc.nextInt()/3.305785);
}
public static void main(String[] args) {
new AOJ0094().run();
}
} | Main.java:12: error: cannot find symbol
new AOJ0094().run();
^
symbol: class AOJ0094
location: class Main
1 error
|
s390426157 | p00094 | Java | import java.util.Scanner;
//Calculation of Area
public class Main {
void run(){
Scanner sc = new Scanner(System.in);
System.out.printf("%.8f\n", sc.nextInt()*sc.nextInt()/3.305785);
}
public static void main(String[] args) {
new Main.run();
}
} | Main.java:12: error: cannot find symbol
new Main.run();
^
symbol: class run
location: class Main
1 error
|
s807310890 | p00094 | Java | import java.util.Scanner;
public class Main{
static Scanner sc = new java.util.Scanner(System.in);
public static void main(String[] args) {
while ( sc.hasNext() ){
double a = sc.nextInt();
double b = sc.nextInt();
double x = a * b ;
double S = x / 3.305785 ;
BigDecimal bix = new BigDecimal (String.valueOf(S));
S =bix.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
System.out.println( S );
}
}
} | Main.java:18: error: cannot find symbol
BigDecimal bix = new BigDecimal (String.valueOf(S));
^
symbol: class BigDecimal
location: class Main
Main.java:18: error: cannot find symbol
BigDecimal bix = new BigDecimal (String.valueOf(S));
^
symbol: class BigDecimal
location: class Main
Main.java:19: error: cannot find symbol
S =bix.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
^
symbol: variable BigDecimal
location: class Main
3 errors
|
s900985821 | p00094 | Java | import java.util.Scanner;
public class Main{
static Scanner sc = new java.util.Scanner(System.in);
public static void main(String[] args) {
while ( sc.hasNext() ){
double a = sc.nextInt();
double b = sc.nextInt();
double x = a * b ;
double s = x / 3.305785 ;
BigDecimal bix = new BigDecimal (String.valueOf(s));
s =bix.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
System.out.println( s );
}
}
} | Main.java:18: error: cannot find symbol
BigDecimal bix = new BigDecimal (String.valueOf(s));
^
symbol: class BigDecimal
location: class Main
Main.java:18: error: cannot find symbol
BigDecimal bix = new BigDecimal (String.valueOf(s));
^
symbol: class BigDecimal
location: class Main
Main.java:19: error: cannot find symbol
s =bix.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
^
symbol: variable BigDecimal
location: class Main
3 errors
|
s970763345 | p00094 | Java | public class main {
public static void main(String[] args) {
double tsubo = 3.305785;
int vertical = Integer.parseInt(args[0]);
int side = Integer.parseInt(args[1]);
double land = (vertical * side) / tsubo;
System.out.println(land);
}
} | Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s164005515 | p00094 | C | #include <stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b)
printf("%lf\n", (a * b) / 3.305785);
return 0;
} | main.c: In function 'main':
main.c:6:31: error: expected ';' before 'printf'
6 | scanf("%d %d", &a, &b)
| ^
| ;
7 |
8 | printf("%lf\n", (a * b) / 3.305785);
| ~~~~~~
|
s181148264 | p00094 | C | #include <stdio.h>
int main(void)
{
int a, b;
while(~scanf("%d %d", &a, &b))
printf("%f\n", a * b / 3.305785);
0return ;
} | main.c: In function 'main':
main.c:10:5: error: invalid suffix "return" on integer constant
10 | 0return ;
| ^~~~~~~
|
s926137572 | p00094 | C | include <stdio.h>
int main(void)
{
float a;
float b;
scanf("%f %f" ,&a ,&b);
printf("%f" , ( a * b ) / 3.305785 );
return (0);
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s916081300 | p00094 | C | #include <stdio.h>
int main(void)
{
int a, b;
double S;
scanf_s("%d %d", &a, &b);
S = (a * b) / 3.305785;
printf("%.6f\n", S);
return (0);
} | main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s065305960 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d , &a, &b)
S=(double)(a*b/ 3.305785);
printf("%lf" , S);
return 0;
} | main.c: In function 'main':
main.c:5:7: warning: missing terminating " character
5 | scanf("%d %d , &a, &b)
| ^
main.c:5:7: error: missing terminating " character
5 | scanf("%d %d , &a, &b)
| ^~~~~~~~~~~~~~~~
main.c:6:26: error: expected ')' before ';' token
6 | S=(double)(a*b/ 3.305785);
| ^
| )
main.c:5:6: note: to match this '('
5 | scanf("%d %d , &a, &b)
| ^
main.c:6:2: error: incompatible type for argument 1 of 'scanf'
6 | S=(double)(a*b/ 3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:11: error: expected ';' before '}' token
8 | return 0;
| ^
| ;
9 | }
| ~
|
s974517207 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d , &a, &b)
S=(double)(a*b/ 3.305785);
printf("%lf", S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d , &a, &b)
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d , &a, &b)
| ^~~~~~~~~~~~~~~~
main.c:9:26: error: expected ')' before ';' token
9 | S=(double)(a*b/ 3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d , &a, &b)
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/ 3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s391691057 | p00094 | C | #include <stdio.h>
int main(void){
int a,b;
double S;
scant("%d %d",&a,&b);
S=(double)(a*b/3.305785);
printf("%lf",S);
return 0;
} | main.c: In function 'main':
main.c:9:6: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scant("%d %d",&a,&b);
| ^~~~~
| scanf
|
s845444554 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d , &a, &b);
S=(double)(a*b/ 3.305785);
printf("%lf", S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d , &a, &b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d , &a, &b);
| ^~~~~~~~~~~~~~~~~
main.c:9:26: error: expected ')' before ';' token
9 | S=(double)(a*b/ 3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d , &a, &b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/ 3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s472300615 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d, &a, &b);
S=(double)(a*b/ 3.305785);
printf("%lf",S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^~~~~~~~~~~~~~~~
main.c:9:26: error: expected ')' before ';' token
9 | S=(double)(a*b/ 3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d, &a, &b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/ 3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s330161216 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d,&a,&b);
S=(double)(a*b/ 3.305785);
printf("%lf",S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d,&a,&b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d,&a,&b);
| ^~~~~~~~~~~~~~
main.c:9:26: error: expected ')' before ';' token
9 | S=(double)(a*b/ 3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d,&a,&b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/ 3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s387986334 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d,&a,&b);
S=(double)(a*b/3.305785);
printf("%lf",S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d,&a,&b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d,&a,&b);
| ^~~~~~~~~~~~~~
main.c:9:25: error: expected ')' before ';' token
9 | S=(double)(a*b/3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d,&a,&b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s606242337 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d, &a, &b);
S=(double)(a*b/3.305785);
printf("%lf",S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^~~~~~~~~~~~~~~~
main.c:9:25: error: expected ')' before ';' token
9 | S=(double)(a*b/3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d, &a, &b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s684363084 | p00094 | C | #include<stdio.h>
int main() {
int a, b;
double S;
scanf("%d %d, &a, &b);
S=(double)(a*b/3.305785);
printf("%lf", S);
return 0;
} | main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^
main.c:8:7: error: missing terminating " character
8 | scanf("%d %d, &a, &b);
| ^~~~~~~~~~~~~~~~
main.c:9:25: error: expected ')' before ';' token
9 | S=(double)(a*b/3.305785);
| ^
| )
main.c:8:6: note: to match this '('
8 | scanf("%d %d, &a, &b);
| ^
main.c:9:2: error: incompatible type for argument 1 of 'scanf'
9 | S=(double)(a*b/3.305785);
| ~^~~~~~~~~~~~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'double'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:11: error: expected ';' before '}' token
12 | return 0;
| ^
| ;
13 | }
| ~
|
s745520397 | p00094 | C | #include<stdio.h>
int main(void){
int a,b;
double s,t;
scanf("%d %d",&a,&b);
s=(double)(a*b)/3.305785;
printf("%lf\n",s);
retunr 0;
}
| main.c: In function 'main':
main.c:13:9: error: 'retunr' undeclared (first use in this function)
13 | retunr 0;
| ^~~~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:15: error: expected ';' before numeric constant
13 | retunr 0;
| ^~
| ;
|
s944097821 | p00094 | C++ | #include<stdio.h>
int main(){
int i,j;
int a = 15;
int b = 25;
i = a*b;
j = i/3.305785;
printf("j");
}
return 0; | a.cc:10:1: error: expected unqualified-id before 'return'
10 | return 0;
| ^~~~~~
|
s498005275 | p00094 | C++ | #include<stdio.h>
int main(){
int a, b;
double S;
scanf("%d %d", &a, &b);
S=(double)(a:b/3.305785);
printf("%if, S");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: found ':' in nested-name-specifier, expected '::'
9 | S=(double)(a:b/3.305785);
| ^
| ::
a.cc:9:15: error: 'a' is not a class, namespace, or enumeration
9 | S=(double)(a:b/3.305785);
| ^
|
s895261273 | p00094 | C++ | #include<stdio.h>
int main(){
int a, b;
double S;
scanf("%d %d", &a, &b);
S=(double)(a:b/3.305785);
printf("%lf, S");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: found ':' in nested-name-specifier, expected '::'
9 | S=(double)(a:b/3.305785);
| ^
| ::
a.cc:9:15: error: 'a' is not a class, namespace, or enumeration
9 | S=(double)(a:b/3.305785);
| ^
|
s737530330 | p00094 | C++ |
if __name__=="__main__":
a=int(raw_input())
b=int(raw_input())
a=a*b
print a/3.305785
| a.cc:2:1: error: expected unqualified-id before 'if'
2 | if __name__=="__main__":
| ^~
|
s256045925 | p00094 | C++ | #include<iostream>
using namespace std;
int main(){
double a, b;
cin >> a >> b;
double ans = (a * b) / 3.305785;
cout << fixed << setprecision(6) << ans << "\n";
} | a.cc: In function 'int main()':
a.cc:7:20: error: 'setprecision' was not declared in this scope
7 | cout << fixed << setprecision(6) << ans << "\n";
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #include<iostream>
+++ |+#include <iomanip>
2 | using namespace std;
|
s712049561 | p00094 | C++ | #include<iostream>
using namespase std;
int main() {
int a, b;
cin >> a >> b;
cout << a*b/3.305785;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | cout << a*b/3.305785;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s131090777 | p00094 | C++ | #include <stdio.h>
void main()
{int a,b,ab;
float tubo;
printf("???*?¨?????(??°??????????§?????????????????????\??????????????¨???\n)");
scanf("%d %d",a,b);
ab=a*b,tubo=ab/3.305785;
printf("?????°???%f",tubo);
return ;
} | a.cc:5:18: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
5 | printf("???*?¨?????(??°??????????§?????????????????????\??????????????¨???\n)");
a.cc:2:1: error: '::main' must return 'int'
2 | void main()
| ^~~~
a.cc: In function 'int main()':
a.cc:9:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
9 | return ;
| ^~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.