submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s446377877 | p00147 | Java | import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
/**
* Fukushimaken
*/
public class Main{
/** 食べ終わるまでの時間 */
public static final int[] timeToEatList = {19, 39, 25, 36, 22, 42};
/** 座席数 ... | Main.java:129: error: reached end of file while parsing
}
^
1 error
|
s193935048 | p00147 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class NewFukushimaken {
/*** ??°??????????????° */
private static final int GROUP_NUM = 100;
private static BufferedReader br;
priv... | Main.java:9: error: class NewFukushimaken is public, should be declared in a file named NewFukushimaken.java
public class NewFukushimaken {
^
1 error
|
s245419317 | p00147 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int[] seats = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0};
int[] groupMembers = new int[] {2, 5, 2, 2, 2};
int[] e... | Main.java:24: error: cannot find symbol
inputted.put(ni);
^
symbol: method put(int)
location: variable inputted of type List<Integer>
1 error
|
s992782068 | p00147 | Java | public class Main03 {
public static void main(String[] args) {
}
/**
* index番目のグループの到着時刻を返却する(正午からの経過時間)
* 単位:分
* @param index
* @return 到着時刻
*/
private static int getArriveTime(int index) {
return index * 5;
}
/**
* index番目のグループの人数を返却する
* 単位:人
... | Main.java:1: error: class Main03 is public, should be declared in a file named Main03.java
public class Main03 {
^
1 error
|
s490632823 | p00147 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class NewFukushimaken {
/** 対象外 */
private static final int EXEMPT = -1;
/** グループ数 */
private static final int GROUP_NUM = 100;
/*... | Main.java:8: error: class NewFukushimaken is public, should be declared in a file named NewFukushimaken.java
public class NewFukushimaken {
^
1 error
|
s967674219 | p00147 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main2 {
public static void main(String[] args) throws IOException {
// ????????????????????°???????????????
// ???
int[] seat = new int[17];
// ??????... | Main.java:8: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s803841995 | p00147 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Fukushimaken {
// ??£?????????????????????????????????
private int time = 0;
// ?????????????????????????????§????????°???????????°
private int groupCount = 0;
public ... | Main.java:6: error: class Fukushimaken is public, should be declared in a file named Fukushimaken.java
public class Fukushimaken {
^
1 error
|
s155678062 | p00147 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main{
// ??£?????????????????????????????????
private int time = 0;
// ?????????????????????????????§????????°???????????°
private int groupCount = 0;
public static vo... | Main.java:15: error: cannot find symbol
new Fukushimaken().execute();
^
symbol: class Fukushimaken
location: class Main
1 error
|
s579501978 | p00147 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MAX 100
struct S{
int g, t;
S(int g, int t) : g(g), t(t) {}
};
int arr[MAX];
vector<S> seat;
int minute(int i){
return 17*(i%2) + 3*(i%3) + 19;
}
void make(){
int g = 0;
for(int i = 0 ; i < 17 ; i++){
seat.push_back(S(-1,-1));
}
vector<... | a.cc: In function 'void make()':
a.cc:24:10: error: 'info' was not declared in this scope
24 | vector<info> _wait;
| ^~~~
a.cc:24:14: error: template argument 1 is invalid
24 | vector<info> _wait;
| ^
a.cc:24:14: error: template argument 2 is invalid
a.cc:26:22: error: reques... |
s442962781 | p00147 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Main {
/** 対象外 */
private static final int EXEMPT = -1;
/** グループ数 */
private static final int GROUP_NUM = 100;
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
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.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fm... |
s976319685 | p00147 | C++ | #include<queue>
#include<cstdio>
#define mp make_pair
#define EMPTY -1
using namespace std;
typedef pair<int,int> pii;
int Numbers(int groupid){
return groupid%5==1?5:2;
}
int MealTime(int groupid){
return 17*(groupid%2)+3*(groupid%3)+19;
}
int main()
{
int counter[17],elapse[17],mealtime[17];
queue<pii> qu; ... | a.cc: In function 'int main()':
a.cc:64:34: error: expected ';' before ')' token
64 | for(int n;~scanf("%d",&n)) printf("%d\n",waittime[n]);
| ^
| ;
|
s211207455 | p00147 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
int seat[17] = {0};
int X = 0;
int stop[100] = {0};
int time = 0;
queue<int> Q;
while(X < 100){
int x;
if(time%5 == 0 && time < 500){
Q.pu... | a.cc: In function 'int main()':
a.cc:59:29: error: expected ';' before '}' token
59 | while(c>=5){return 1};
| ^
| ;
|
s576966472 | p00147 | C++ | main(){
int n,c=0;
while(~scanf("%d",&n)){
if(n==98)c++;
}
return (c?1:0);
} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:16: error: 'scanf' was not declared in this scope
3 | while(~scanf("%d",&n)){
| ^~~~~
|
s587217728 | p00148 | Java | #include <stdio.h>
int main(int argc,char* argv[]){
int num;
while(scanf("%d",&num) != EOF){
int d = num % 39;
if(d == 0){
d = 39;
}
printf("3C%02d\n",d);
}
return 0;
} | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:7: error: class, interface, enum, or record expected
while(scanf("%d",&num) != EOF){
^
Main.java:9: error: class, interface, enum, or record expected... |
s688945619 | p00148 | C | main(c){for(;~scanf("%d",&c)*c;printf("3C%02d\n",c%39?c%39+1));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(c){for(;~scanf("%d",&c)*c;printf("3C%02d\n",c%39?c%39+1));}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-f... |
s078226850 | p00148 | C | main(c){for(;~scanf("%d",%c)*c;printf("3C%02d\n",c%39?:39));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(c){for(;~scanf("%d",%c)*c;printf("3C%02d\n",c%39?:39));}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-func... |
s292652939 | p00148 | C | #include<stdio.h>
int main(void)
{
int n;
while(scanf("%d",&n)!=EOF){
if((n-1)%38<10){
printf("3C0%d\n",(n-1)%38+1);
} else {
printf("3C%d\n",(n-1)%38+1);
}
return 0;
} | main.c: In function 'main':
main.c:14:1: error: expected declaration or statement at end of input
14 | }
| ^
|
s753763701 | p00148 | C | #include <stdio.h>
int main(void)
{
int n;
while (scanf("%d", &n) != EOF){
if (n > 39){
while (1){
n = n - 39;
if (n < 39){
if (n > 9){
if (n == 0){
n = 39;
printf("3C%d\n", n);
break;
}
else {
printf("3C%d\n", n);
}
else {
printf("3C0... | main.c: In function 'main':
main.c:21:41: error: expected '}' before 'else'
21 | else {
| ^~~~
|
s425933546 | p00148 | C | #include <stdio.h>
int main(void)
{
int can;
while (scanf("%d", &can) != EOF){
if (can % 39 == 0){
printf(("3C39\n");
}
else if (can % 39 < 10){
printf("3C0%d\n", can % 39);
}
else {
printf("3C%d\n", can % 39);
}
}
return (0);
} | main.c: In function 'main':
main.c:9:42: error: expected ')' before ';' token
9 | printf(("3C39\n");
| ~ ^
| )
main.c:9:43: error: expected ';' before '}' token
9 | printf(... |
s377678543 | p00148 | C | main(n){for(;~scanf("%d",&n);)printf("3C%02d
",~-n%39+1);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(n){for(;~scanf("%d",&n);)printf("3C%02d
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]... |
s298927327 | p00148 | C | z=main(a){for(;z=~scanf("%d",&a);printf("3C%02d\n",(a-1)%39+1));} | main.c:1:1: warning: data definition has no type or storage class
1 | z=main(a){for(;z=~scanf("%d",&a);printf("3C%02d\n",(a-1)%39+1));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'z' [-Wimplicit-int]
main.c:1:3: error: implicit declaration of function 'main' [-Wimplicit-function-declarati... |
s695475654 | p00148 | C++ | include <iostream>
using namespace std;
int main() {
int candy = 0;
while (true){
cin >> candy;
if (candy == EOF) {
break;
}
cout << candy % 39 << endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >> candy;
| ^~~
a.cc:10:18: error: 'EOF' was not declared in this scope
10 | if (candy == EOF) {
| ... |
s014755601 | p00148 | C++ | #include<iostream>
using namespace std;
int main(){
int n,count;
while(1){
cin>>n;
if(n==char_traits<char>::eof)break;
count=n%39;
if(count==0)count=39;
cout<<"3C"<<count<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if(n==char_traits<char>::eof)break;
| ~^~~~~~~~~~~~~~~~~~~~~~~~
|
s801877880 | p00148 | C++ | #include<iostream>
using namespace std;
int main(){
int n,count;
while(cin>>n){
count=n%39;
if(count==0)count=39;
cout<<"3C"<<(count/10==0)?"0"+count:count<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:58: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | cout<<"3C"<<(count/10==0)?"0"+count:count<<endl;
| ~~~~~^~~~~~
|
s843705502 | p00148 | C++ | #include using namespace std;
int main() {
int n;
while (cin >> n) {
int s = n % 39;
if (s == 0) {
cout << "3C39" << endl;
} else if (s < 10) {
cout << "3C0" << s << endl;
} else {
cout << "3C" << s << endl;
}
}
return 0;
} | a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include using namespace std;
| ^~~~~
a.cc: In function 'int main()':
a.cc:4:16: error: 'cin' was not declared in this scope
4 | while (cin >> n) {
| ^~~
a.cc:7:25: error: 'cout' was not declared in this ... |
s757050729 | p00148 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
???int n;
???cout.fill('0');
???while(cin>>n){
??????if(n%39==0)cout<<"3C39"<<endl;
??????else cout<<"3C"<<setw(2)<<n%39<<endl;
???}
} | a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:3: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:4: error... |
s977337367 | p00148 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
???int n;
???cout.fill('0');
???while(cin>>n){
??????if(n%39==0)cout<<"3C39"<<endl;
??????else cout<<"3C"<<setw(2)<<n%39<<endl;
???}
} | a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:3: error: expected primary-expression before '?' token
5 | ???int n;
| ^
a.cc:5:4: error... |
s939916842 | p00148 | C++ | using System;
class myclass
{
public static void Main()
{
string s;
int g,x=0;
int[] k=new int[20];
for (int i = 0; i < 20; i++){
s = Console.ReadLine();
if (s == "EOF"){
x = i;
break;
}
g = Int32.Pa... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:5:11: error: expected ':' before 'static'
5 | public static void Main()
| ^~~~~~~
| :
a.cc:32:2: error: expected ';' after class definition
32 | }
| ^
|... |
s264653172 | p00148 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
int a;
while(cin>>a){
(a-1)%=39;
a++;
cout<<3<<'c';
if(a<10)cout<<0;
cout<<a<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:19: error: lvalue required as left operand of assignment
7 | (a-1)%=39;
| ~~^~~
|
s561573274 | p00148 | C++ | #include<bits/stdc++.h>
using namespace std;
int a;
int main(){
while(scanf("%d",&a)!=EOF){
if(a%39!=0)printf("3C%02d\n",a%39);A
else cout<<"3C39"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:41: error: 'A' was not declared in this scope
6 | if(a%39!=0)printf("3C%02d\n",a%39);A
| ^
|
s541171977 | p00148 | C++ | #include<stdio.h>
int main(void)
{
int a;
while(scanf("%d",&a)!=EOF){
if(a%39==0) printf("3c39\n");
else{
if(a%39>=10) printf("3C%d",a%39);
else printf("3C0%d",a%39);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s497797884 | p00148 | C++ | #include<stdio.h>
int main(void)
{
int x;
scanf("%d",&x);
while(1){
a=a-39;
if(a<=39) break;
}
if(a<10){
printf("3C0%d\n",a);
}
else {
printf("3C%d\n",a);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'a' was not declared in this scope
7 | a=a-39;
| ^
a.cc:10:12: error: 'a' was not declared in this scope
10 | if(a<10){
| ^
|
s635301852 | p00148 | C++ | #include<stdio.h>
int main(void)
{
int a,b;
while(scanf("%d",&a)!=EOF) {
b=a%39
if(b==0) b=39;
printf("3C%02d\n",a);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before 'if'
6 | b=a%39
| ^
| ;
7 | if(b==0) b=39;
| ~~
|
s501578051 | p00148 | C++ | int main(){
while(!std::cin.eof()){
int in;
std::cin >> in;
std::cout << "3C" << 1+(in%39)<<std::endl;
}
} | a.cc: In function 'int main()':
a.cc:2:14: error: 'cin' is not a member of 'std'
2 | while(!std::cin.eof()){
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main(){
a.cc:4:6: erro... |
s056152722 | p00148 | C++ | #include<iostream>
int main(){
while(!std::cin.eof()){
int in;
std::cin >> in;
if(!in%=39) in =39;
std::printf("3C%02d\n",in);
}
} | a.cc: In function 'int main()':
a.cc:6:5: error: lvalue required as left operand of assignment
6 | if(!in%=39) in =39;
| ^~~
|
s584760582 | p00148 | C++ | #include<iostream>
int main(){
while(!std::cin.eof()){
int in;
std::cin >> in;
if(!in=in%39) in =39;
std::printf("3C%02d\n",in);
}
} | a.cc: In function 'int main()':
a.cc:6:5: error: lvalue required as left operand of assignment
6 | if(!in=in%39) in =39;
| ^~~
|
s665922305 | p00148 | C++ | #include<iostream>
main()for(int n;std::cin>>n;)printf("3C%02d\n",--n%39+1); | a.cc:2:7: error: expected constructor, destructor, or type conversion before 'for'
2 | main()for(int n;std::cin>>n;)printf("3C%02d\n",--n%39+1);
| ^~~
a.cc:2:22: error: 'cin' in namespace 'std' does not name a type
2 | main()for(int n;std::cin>>n;)printf("3C%02d\n",--n%39+1);
| ... |
s391736226 | p00148 | C++ | #include <iostream>
using namespace std;
int main(){
while( cin >> n ){
int x = n%39 + 1;
cout << "3C";
if( x < 10 ) cout << 0;
cout << x << endl;
}
} | a.cc: In function 'int main()':
a.cc:5:19: error: 'n' was not declared in this scope
5 | while( cin >> n ){
| ^
|
s761365814 | p00148 | C++ | main(n){
for(;~scanf("%d",&n);printf(n<10?"3C0%d\n":"3C%d\n",n))
n=(n-1)%39+1;
} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){
| ^
|
s238807516 | p00148 | C++ | i;main(n){for(;i=~scanf("%d",&n);printf("3C%02d\n",n))n=(n%39)?n%39:39;} | a.cc:1:1: error: 'i' does not name a type
1 | i;main(n){for(;i=~scanf("%d",&n);printf("3C%02d\n",n))n=(n%39)?n%39:39;}
| ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | i;main(n){for(;i=~scanf("%d",&n);printf("3C%02d\n",n))n=(n%39)?n%39:39;}
| ^
|
s752872736 | p00148 | C++ | #include <iostream>
using namespace std;
int main()
{
while(true)
{
int candy;
cin >> candy;
if ( cin.eof() ) break;
cout << "3C" << candy&39 << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:30: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
11 | cout << "3C" << candy&39 << endl;
| ~~~^~~~~~~
|
s491060446 | p00148 | C++ | #include<stdio.h>
int main(void)
{
int n;
while(1){
if(scanf("%d",&n)==EOF){
break;
}
while(n>=39){
n=n-39
}
if(n<10){
printf("3C0%d",n);
}
else{
printf("3C%d\n",n);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before '}' token
10 | n=n-39
| ^
| ;
11 | }
| ~
|
s206229385 | p00148 | C++ | #include<stdio.h>
int main(void)
{
int x,ama;
while(1) {
if(scanf("%d",&x)==EOF){
break;
}
while(n>=39){
n=n-39;
}
if(ama==0) {
ama=39;
}
if(ama<10) {
printf("3C0%d\n",ama);
}
else {
printf("3C%d\n",ama);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:23: error: 'n' was not declared in this scope
10 | while(n>=39){
| ^
|
s649607135 | p00148 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
while (cin>>n)
cout << "3C" << setw(2) << setfill('0') << (n%39==0?39:n%39) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:33: error: 'setw' was not declared in this scope
7 | cout << "3C" << setw(2) << setfill('0') << (n%39==0?39:n%39) << endl;
| ^~~~
a.cc:2:1: note: 'std::setw' is defined in header '<iomanip>'; this is probably fixable by add... |
s530167926 | p00148 | C++ | #include<iostream>
using namespace std;
int main(){
int in;
while(cin>>in){
cout<<"3C"<<etfill(’0′) << setw(2) << right<<(in-1)%39+1<<endl;
}
} | a.cc:6:20: error: extended character ’ is not valid in an identifier
6 | cout<<"3C"<<etfill(’0′) << setw(2) << right<<(in-1)%39+1<<endl;
| ^
a.cc:6:20: error: extended character ′ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:20: error: '\U000020190\U00002032' was not... |
s905815482 | p00148 | C++ | #include<iostream>
#include<iomanip>
using namespace std;
int main(){
int in;
while(cin>>in){
cout<<"3C"<<etfill(’0′) << setw(2) << right<<(in-1)%39+1<<endl;
}
} | a.cc:7:20: error: extended character ’ is not valid in an identifier
7 | cout<<"3C"<<etfill(’0′) << setw(2) << right<<(in-1)%39+1<<endl;
| ^
a.cc:7:20: error: extended character ′ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:20: error: '\U000020190\U00002032' was not... |
s370713437 | p00149 | C | #include<stdio.h>
int main(void){
double l,r;
int countla=0;
int countra=0;
int countlb=0;
int countrb=0;
int countlc=0;
int countrc=0;
int countld=0;
int countrd=0;
while(scanf("%lf %lf",&l,&r) != EOF){
if(l>=1.1){
countla++;
}
else if(l<1.1&&l>=0.6){
countlb++;
}
else if(l<0.6&&l>=0.2){
countlc++;
}
else if(l<0.2... | main.c: In function 'main':
main.c:49:1: error: expected declaration or statement at end of input
49 | }
| ^
|
s630020320 | p00149 | C | #include <stdio.h>
int main(void)
{
float judge[4] = {1.1, 0.6, 0.2, 0.0};
float f, i;
int eye[4][2] = {0};
while (scanf("%f", &f) != EOF){
i = 0;
while (1){
if (f >= judge[i]){
eye[i][0]++;
break;
}
i++;
}
scanf("%f", &f);
i = 0;
while (1){
if (f >= judge[i]){
eye[i][1]++... | main.c: In function 'main':
main.c:12:39: error: array subscript is not an integer
12 | if (f >= judge[i]){
| ^
main.c:13:36: error: array subscript is not an integer
13 | eye[i][0]++;
| ... |
s489051356 | p00149 | C | #include <stdio.h>
void check(double eye, int table[4]);
int main(void)
{
int right[4] = {0};
int left[4] = {0};
double r, l;
while (scanf("%lf %lf", &r, &l) != EOF){
check(r, right);
check(l, lef);
}
for (i = 0; i < 4; i++){
printf("%d %d\n", left[i], right[i]);
}
return 0;
}
void check(double eye... | main.c: In function 'main':
main.c:13:26: error: 'lef' undeclared (first use in this function); did you mean 'left'?
13 | check(l, lef);
| ^~~
| left
main.c:13:26: note: each undeclared identifier is reported only once for each function it... |
s424215474 | p00149 | C | main(l[4],r[4],i){float a,b;for(;~scanf("%f%f",&a,&b);){l[a<0.2?3:a<0.6?2:a<1.1?1:0]++;r[b<0.2?3:b<0.6?2:b<1.1?1:0]++;}for(i=0;i<4;i++){printf("%d %d\n",l[i],r[i]);}} | main.c:1:6: error: unknown type name 'l'
1 | main(l[4],r[4],i){float a,b;for(;~scanf("%f%f",&a,&b);){l[a<0.2?3:a<0.6?2:a<1.1?1:0]++;r[b<0.2?3:b<0.6?2:b<1.1?1:0]++;}for(i=0;i<4;i++){printf("%d %d\n",l[i],r[i]);}}
| ^
main.c:1:11: error: unknown type name 'r'
1 | main(l[4],r[4],i){float a,b;for(;~scanf... |
s351031176 | p00149 | C | /* https://tausiq.wordpress.com/2008/12/09/uva-100-the-3n-1-problem/ */
#include <cstdio>
#include <algorithm>
#define long
long LL
using namespace std;
int main ()
{
int i, j;
while ( scanf ("%d %d", &i, &j) != EOF ) {
int temp_i =
i;
int temp_j = j;
if ( i > j ) swap (i, ... | main.c:2:10: fatal error: cstdio: No such file or directory
2 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s380174812 | p00149 | C | #include <stdio.h>
int main(void){
int ans[4][2]={0},i,j;
double l,r;
while(scanf("%lf %lf",&l,&r)!=EOF){
if(l>1.1)ans[0][0]++;
else if(l>0.6)ans[1][0]++;
else if(l>0.2)ans[2][0]++;
else ans[3][0]++;
if(r>1.1)ans[0][1]++;
else if(r>0.6)ans[1][1]++;
else if(r>0.2)ans[2][1]++;
else a... | main.c: In function 'main':
main.c:16:22: error: 'a' undeclared (first use in this function)
16 | printf("%d %d\n",a[i][0],a[i][1]);
| ^
main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
|
s505967588 | p00149 | C | int main(){
int s[4][2]={0,0,0,0,0,0,0,0};
double b[2];
while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
for(j=0;j<2;j++){
if(b[j]>=1.1)
s[0][j]++;
else if(b[j]>=0.6)
s[1][j]++;
else if(b[j]>=0.2)
s[2][j]++;
else s[3][j]++;
}
for(j=0;j<4;j++)
printf("%lf %lf\n",s[i][0],s[i][1]);
}
return 0;
} | main.c: In function 'main':
main.c:4:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
| ^~~~~
main.c:1:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){... |
s916664107 | p00149 | C | int main(){
int s[4][2]={0,0,0,0,0,0,0,0};
double b[2];
while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
for(j=0;j<2;j++){
if(b[j]>=1.1)
s[0][j]++;
else if(b[j]>=0.6)
s[1][j]++;
else if(b[j]>=0.2)
s[2][j]++;
else s[3][j]++;
}
for(j=0;j<4;j++)
printf("%d %d\n",s[i][0],s[i][1]);
}
return 0;
} | main.c: In function 'main':
main.c:4:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
| ^~~~~
main.c:1:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){... |
s988858211 | p00149 | C | #include<stdio.h>
int main(){
int s[4][2]={0,0,0,0,0,0,0,0};
double b[2];
while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
for(j=0;j<2;j++){
if(b[j]>=1.1)
s[0][j]++;
else if(b[j]>=0.6)
s[1][j]++;
else if(b[j]>=0.2)
s[2][j]++;
else s[3][j]++;
}
for(j=0;j<4;j++)
printf("%d %d\n",s[i][0],s[i][1]);
}
return 0;
} | main.c: In function 'main':
main.c:6:5: error: 'j' undeclared (first use in this function)
6 | for(j=0;j<2;j++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:20: error: 'i' undeclared (first use in this function)
16 | printf("%d %d\n",... |
s749661896 | p00149 | C | #include<stdio.h>
int main(){
int s[4][2]={0,0,0,0,0,0,0,0},j;
double b[2];
while(scanf("%lf %lf",&b[0],&b[1])!=EOF){
for(j=0;j<2;j++){
if(b[j]>=1.1)
s[0][j]++;
else if(b[j]>=0.6)
s[1][j]++;
else if(b[j]>=0.2)
s[2][j]++;
else s[3][j]++;
}
for(j=0;j<4;j++)
printf("%d %d\n",s[i][0],s[i][1]);
}
return 0;
} | main.c: In function 'main':
main.c:16:20: error: 'i' undeclared (first use in this function)
16 | printf("%d %d\n",s[i][0],s[i][1]);
| ^
main.c:16:20: note: each undeclared identifier is reported only once for each function it appears in
|
s800815471 | p00149 | C | #include<stdio.h>
int main(void)
{
int a,b,i;
float x,y;
a=0;b=0;
scanf("%d %d",&x,&y);
while(x!=0 && y!=0) {
if(x>=1.1) {
printf("A\n");
}
if(0.6<=x && x<1.1) {
printf("B\n");
}
if(0.2<=x && x<0.6) {
printf("C\n");
}
if(x<0.2) {
printf("D\n");
}
if(y>=1.1) {
printf("A\n");
}
i... | main.c: In function 'main':
main.c:33:20: error: 'X' undeclared (first use in this function)
33 | a+=X;
| ^
main.c:33:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:20: error: 'Y' undeclared (first use in this function)
... |
s985137393 | p00149 | C | #include <stdio.h>
typedef struct eye{
int Left,Right;
};
int main(){
eye A,B,C,D;
A.Left=B.Left=C.Left=D.Left=0;
A.Right=B.Right=C.Right=D.Right=0;
float L,R;
while(scanf("%f%f",&L,&R)!=EOF){
if(L>=1.1) A.Left++;
else if(L>=0.6) B.Left++;
else if(L>=0.2) C.Left++;
else D.Left++;
if(R>=1.1) A.Right++;... | main.c:5:1: warning: useless storage class specifier in empty declaration
5 | };
| ^
main.c: In function 'main':
main.c:8:9: error: unknown type name 'eye'; use 'struct' keyword to refer to the type
8 | eye A,B,C,D;
| ^~~
| struct
main.c:9:10: error: request for member... |
s381719824 | p00149 | C | #include <stdio.h>
typedef struct eye{
int Left,Right;
};
int main(){
eye A,B,C,D;
A.Left=B.Left=C.Left=D.Left=0;
A.Right=B.Right=C.Right=D.Right=0;
float L,R;
while(scanf("%f%f",&L,&R)!=EOF){
if(L>=1.1) A.Left++;
else if(L>=0.6) B.Left++;
else if(L>=0.2) C.Left++;
else D.Left++;
if(R>=1.1) A.Right++;... | main.c:5:1: warning: useless storage class specifier in empty declaration
5 | };
| ^
main.c: In function 'main':
main.c:8:9: error: unknown type name 'eye'; use 'struct' keyword to refer to the type
8 | eye A,B,C,D;
| ^~~
| struct
main.c:9:10: error: request for member... |
s694129805 | p00149 | C | #include <stdio.h>
struct eye{
int Left,Right;
};
int main(){
eye A,B,C,D;
A.Left=B.Left=C.Left=D.Left=0;
A.Right=B.Right=C.Right=D.Right=0;
float L,R;
while(scanf("%f%f",&L,&R)!=EOF){
if(L>=1.1) A.Left++;
else if(L>=0.6) B.Left++;
else if(L>=0.2) C.Left++;
else D.Left++;
if(R>=1.1) A.Right++;
else ... | main.c: In function 'main':
main.c:8:9: error: unknown type name 'eye'; use 'struct' keyword to refer to the type
8 | eye A,B,C,D;
| ^~~
| struct
main.c:9:10: error: request for member 'Left' in something not a structure or union
9 | A.Left=B.Left=C.Left=D.Left=0;
... |
s103995970 | p00149 | C | #include <stdio.h>
struct eye{
int Left,Right;
};
int main(){
eye A={0,0},B={0,0},C={0,0},D={0,0};
/*A.Left=B.Left=C.Left=D.Left=0;
A.Right=B.Right=C.Right=D.Right=0;*/
float L,R;
while(scanf("%f%f",&L,&R)!=EOF){
if(L>=1.1) A.Left++;
else if(L>=0.6) B.Left++;
else if(L>=0.2) C.Left++;
else D.Left++;
i... | main.c: In function 'main':
main.c:8:9: error: unknown type name 'eye'; use 'struct' keyword to refer to the type
8 | eye A={0,0},B={0,0},C={0,0},D={0,0};
| ^~~
| struct
main.c:8:18: warning: excess elements in scalar initializer
8 | eye A={0,0},B={0,0},C={0,0},D={0,... |
s058640380 | p00149 | C | main(){float e;int d[4][2]={0},i;for(i=0;~scanf("%f",&e);i^=1)e>1.0?d[0][i]++:e>0.5?d[1][i]++:e>0.2?d[2][i]++:d[3][i]++;for(i=0;i<4;i++)printf("%d %d\n",d[i][0],d[i][1]);exit(0)} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){float e;int d[4][2]={0},i;for(i=0;~scanf("%f",&e);i^=1)e>1.0?d[0][i]++:e>0.5?d[1][i]++:e>0.2?d[2][i]++:d[3][i]++;for(i=0;i<4;i++)printf("%d %d\n",d[i][0],d[i][1]);exit(0)}
| ^~~~
main.c: In function 'main':
main.c:1:43: error: implic... |
s457046861 | p00149 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
const double eps = 0.001;
#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)
int main(){
int eye[4][2]={};
while(1){
rep(i,2){
if(a[i]+eps>1.1){
eye[0][i]++;
} else if(a[i]+... | a.cc: In function 'int main()':
a.cc:14:16: error: 'a' was not declared in this scope
14 | if(a[i]+eps>1.1){
| ^
|
s076590629 | p00149 | C++ | 1.0 1.2
0.8 1.5
1.2 0.7
2.0 2.0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1.0 1.2
| ^~~
|
s011772984 | p00149 | C++ | #include<stdio.h>
int main(){
int x1,x2,y1,y2;
int A[5]={},B[5]={};
while(scanf("%d.%d %d.%d",x1,x2,y1,y2)!=EOF)
{
if(x1>=2)A[0]++;
else if(x1==1&&x2>=1)A[0]++;
else if(x1==0&&x2>=6)A[1]++;
else if(x1==0&&x2>=2)A[2]++;
else if(x1==0&&x2<2)A[3]++;
if(Y1>=2)B[0]++;
else if(y1==1&&y2>=1)B[0]++;
else if(y1==0&&y2>=6)B[1... | a.cc: In function 'int main()':
a.cc:15:4: error: 'Y1' was not declared in this scope; did you mean 'y1'?
15 | if(Y1>=2)B[0]++;
| ^~
| y1
a.cc:22:8: error: unable to find string literal operator 'operator""A' with 'const char [7]', 'long unsigned int' arguments
22 | printf("%d %d\n"A[i],B[i]);
... |
s581940360 | p00149 | C++ | #include<iostream>
using namespace std;
int main(){
double a[2];
int b[4][2]={0};
cin>>n;
while(cin>>a[0]>>a[1]){
for(int i=0;i<2;i++){
if(a[i]<0.2)
b[3][i]++;
else if(a[i]<0.6)
b[2][i]++;
else if(a[i]<1.1)
b[1][i]++;
else
b[0][i]++;
}
}
for(int i=0;i<4;i++)
cout<<b[i][0]<<" "<<b[i][1]<<endl;
... | a.cc: In function 'int main()':
a.cc:8:14: error: 'n' was not declared in this scope
8 | cin>>n;
| ^
|
s964919543 | p00149 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int leye[4]={0,0,0,0},reye[4]={0,0,0,0};
double lef,righ;
while(cin>>lef>>righ){
if(lef==0.1)leye[0]++;
?????? else if(lef<0.6)leye[1]++;
else if(lef<1.1)leye[2]++;
else leye[3]++;
if(righ==0.1)reye[0]++;
else if(righ<0.6)reye[1]++... | a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
9 | ?????? else if(lef<0.6)leye[1]++;
| ^
a.cc:9:2: error: expected primary-expression before '?' token
9 | ?????? else if(lef<0.6)leye[1]++;
| ^
a.cc:9:3: error: expected primary-expression before '?' tok... |
s994466206 | p00149 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int leye[4]={0,0,0,0},reye[4]={0,0,0,0};
double lef,righ;
while(cin>>lef>>righ){
if(lef==0.1)leye[0]++;
?????? else if(lef<0.6)leye[1]++;
else if(lef<1.1)leye[2]++;
else leye[3]++;
if(righ==0.1)reye[0]++;
else if(righ<0.6)reye[1]++... | a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
9 | ?????? else if(lef<0.6)leye[1]++;
| ^
a.cc:9:2: error: expected primary-expression before '?' token
9 | ?????? else if(lef<0.6)leye[1]++;
| ^
a.cc:9:3: error: expected primary-expression before '?' tok... |
s042060779 | p00149 | C++ | #include<iostream>
using namespace std;
void main() {
int right_a = 0, right_b = 0, right_c = 0, right_d = 0;
int left_a = 0, left_b = 0, left_c = 0, left_d = 0;
double right_eye, left_eye;
while (cin >> left_eye >> right_eye) {
if (left_eye >= 1.1)left_a++;
else if (left_eye >= 0.6&&left_eye < 1.1)left_b++;
... | a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s894247127 | p00149 | C++ | #include<iostream>
using namespace std;
int main(){
double left, right;
while( cin >> left >> right ) {
int A[2] = {};
int B[2] = {};
int C[2] = {};
int D[2] = {};
if( left >= 1.1) A[0] ++;
if( 0.6 <= left && left < 1.1) B[0] ++;
if( 0.2 <= left && left < 0.6) C[0] ++;
if( left < 0.2) D[0] ++;
... | a.cc: In function 'int main()':
a.cc:28:17: error: 'A' was not declared in this scope
28 | cout << A[0] << " " << A[1] << "\n";
| ^
a.cc:29:17: error: 'B' was not declared in this scope
29 | cout << B[0] << " " << B[1] << "\n";
| ^
a.cc:30:17: error: 'C'... |
s586548212 | p00149 | C++ | #include<bits/c++.h>
using namespace std;
int main(){
double l;
double r;
int l_a=0;
int l_b=0;
int l_c=0;
int l_d=0;
int r_a=0;
int r_b=0;
int r_c=0;
int r_d=0;
while(cin>>l>>r){
if(l>=1.1)
l_a++;
else if(l>=0.6 && l<1.1)
l_b++;
else if(l>=0.2 && l<0.6)
l_c++;
else if(l<0.2)
... | a.cc:1:9: fatal error: bits/c++.h: No such file or directory
1 | #include<bits/c++.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s436759376 | p00149 | C++ | main(i){int l[4][2]={0};float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(i){int l[4][2]={0};float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
| ^
|
s432522297 | p00149 | C++ | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
| ^~~~
a.cc: In function 'int main()'... |
s540322662 | p00149 | C++ | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
| ^~~~
a.cc: In function 'int main()'... |
s606887583 | p00149 | C++ | #include<stdio.h>
int main(void)
{
double h,m;
int cMA,cHA;
int cMB,cHB;
int cMC,cHC;
int cMD,cHD;
cMA=0;
cHA=0;
cMB=0;
cHB=0;
cMC=0;
cHC=0;
cMD=0;
cHD=0;
while(scanf("%lf %lf",&h,&m)!=EOF){
if(h>=1.1){
cHA++;
}
else if(0.6<=h){
cHB++;
}
else if(0.2<=h){
cHC++;
}
else{
... | a.cc: In function 'int main()':
a.cc:33:39: error: expected ')' before 'm'
33 | else if(0.6<=m m<1.1){
| ~ ^~
| )
|
s295703506 | p00149 | C++ | cout << la << " " << ra << endl; | a.cc:1:5: error: 'cout' does not name a type
1 | cout << la << " " << ra << endl;
| ^~~~
|
s503351505 | p00149 | C++ | include <iostream>
#include <stdio.h>
using namespace std;
int an[4][2],n,i,j;
int main() {
double ey[2];
while(cin >> ey[0] >> ey[1]) {
for (i=0;i<2;i++) {
if (ey[i]>=1.1) j=0;
if (ey[i]>=0.6 && ey[i]<1.1) j=1;
if (ey[i]>=0.2 && ey[i]<0.6) j=2;
if (ey[i]<0.2) j=3;
an[j][i]++;
}
}
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
8 | while(cin >> ey[0] >> ey[1]) {
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fix... |
s698830024 | p00150 | Java | import java.util.Scanner;
public class Q4 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
boolean judge = true;
int count = 0;
int so[] = new int[a];
int Max = 0; int Max2 = 0;
for(int num = 2; num < a; num++){
for(int i = 2; i < num; i++){
i... | Main.java:3: error: class Q4 is public, should be declared in a file named Q4.java
public class Q4 {
^
1 error
|
s297057237 | p00150 | Java | import java.util.Scanner;
public class TestX {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while (true) {
int a = s.nextInt();
if(a == 0) break;
boolean judge = true;
int count = 0;
int so[] = new int[a];
int Max = 0;
int Max2 = 0;
for (int num = 2; num ... | Main.java:3: error: class TestX is public, should be declared in a file named TestX.java
public class TestX {
^
1 error
|
s678040914 | p00150 | Java | import java.util.Scanner;
public class sample {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0;
int[] data= new int [10001];
/*for(i=2;i<=10000;i++){
data[i]=0;
}*/
for(i=2;i<=10000;i++){
... | Main.java:3: error: class sample is public, should be declared in a file named sample.java
public class sample {
^
1 error
|
s193241487 | p00150 | Java | import java.util.Scanner;
public class sample {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
System.out.println("\u0047"+"\u004F");
int[] data= new int [10001];
char ku=' ';
for(i=2;... | Main.java:3: error: class sample is public, should be declared in a file named sample.java
public class sample {
^
1 error
|
s093734568 | p00150 | Java | import java.util.Scanner;
public class Twin Prime {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
System.out.println("\u0047"+"\u004F");
int[] data= new int [10001];
char ku=' ';
for(... | Main.java:3: error: '{' expected
public class Twin Prime {
^
1 error
|
s956472751 | p00150 | Java | import java.util.Scanner;
Public class sample {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
int[] data= new int [10001];
char ku=' ';
for(i=2;i<=10000;i++){
if(data[i]==0){... | Main.java:3: error: class, interface, enum, or record expected
Public class sample {
^
1 error
|
s917572144 | p00150 | Java | import java.util.Scanner;
Public class twin prime {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
int[] data= new int [10001];
char ku=' ';
for(i=2;i<=10000;i++){
if(data[i]=... | Main.java:3: error: class, interface, enum, or record expected
Public class twin prime {
^
Main.java:3: error: '{' expected
Public class twin prime {
^
2 errors
|
s651987622 | p00150 | Java | import java.util.Scanner;
Public class twin {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
int[] data= new int [10001];
char ku=' ';
for(i=2;i<=10000;i++){
if(data[i]==0){
... | Main.java:3: error: class, interface, enum, or record expected
Public class twin {
^
1 error
|
s969427114 | p00150 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = 0,i,j,b=0,k=0;
int[] data= new int [10001];
char ku=' ';
for(i=2;i<=10000;i++){
if(data[i]==0){
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s877865732 | p00150 | C | #include <stdio.h>
#include <math.h>
int isprime(int x){
int i, k=1;
for(i=3; i<=1sqrt(x); i++){
if(x%i==0) {
k=0;
break;
}
}
return k;
}
int main(void){
while(1){
int n;
scanf(" %d", &n);
if(n==0) break;
if(n%2 == 0) n--;
while(isprime(n) != 1 || isprime(n-2) != 1){
n-=2;
}
p... | main.c: In function 'isprime':
main.c:7:21: error: invalid suffix "sqrt" on integer constant
7 | for(i=3; i<=1sqrt(x); i++){
| ^~~~~
|
s720327227 | p00150 | C | #include <stdio.h>
const int max = 10000; //素数表最大数
int prime[max + 1]; //素数表配列
int idx, idx2, tmp;
void list(); //素数表作成
void judge(int n); //双子素数判定
int main(){
int n;
list();
while (scanf("%d", &n)){
if (n == 0) break;
judge(n);
printf("%d %d\n", idx2, idx);
}
... | main.c:4:5: error: variably modified 'prime' at file scope
4 | int prime[max + 1]; //素数表配列
| ^~~~~
|
s153626740 | p00150 | C | #include <stdio.h>
const int max = 10000; //素数表最大数
int prime[max + 1]; //素数表配列
int idx, idx2, tmp;
void list(void); //素数表作成
void judge(int n); //双子素数判定
int main(){
int n;
list();
while (scanf("%d", &n)){
if (n == 0) break;
judge(n);
printf("%d %d\n", idx2, idx);
... | main.c:4:5: error: variably modified 'prime' at file scope
4 | int prime[max + 1]; //素数表配列
| ^~~~~
|
s253693235 | p00150 | C | #include <stdio.h>
#include <math.h>
#include <string>
int isprime(int n) {
int i;
if(n<=1){
return 0;
}
for(i = 2; i*i<=n; i++) {
if(n % i == 0){
return 0;
}
}
return 1;
}
int main(){
int n,i;
while(1){
scanf("%d",&n);
if(n==0){
break;
}
for(i = n;i>=2;i--){
if(isprime(i)&&isprime(i-2... | main.c:3:10: fatal error: string: No such file or directory
3 | #include <string>
| ^~~~~~~~
compilation terminated.
|
s754256279 | p00150 | C | #include <stdio.h>
const in MAX_V = 10000;
int prime[MAX_V + 1];
int main() {
int i, k, n;
for(i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for(i = 2; i * i <= MAX_V; i++) {
if(prime[i]) {
for( k = 2 * i; k <= MAX_V; k += i) {
prime[k] = 0;
}
}
}
while(scanf("%d", &n) = 0) {
for( i = n; i > 1; i-... | main.c:3:7: error: unknown type name 'in'; did you mean 'int'?
3 | const in MAX_V = 10000;
| ^~
| int
main.c:4:5: error: variably modified 'prime' at file scope
4 | int prime[MAX_V + 1];
| ^~~~~
main.c: In function 'main':
main.c:18:31: error: lvalue required as left operand of... |
s671116591 | p00150 | C | #include <stdio.h>
int isprime(int n) {
int i;
for(i = 2; i * i <= n; i++) {
if(n % i == 0) return 0;
}
return 1;
}
int main(){
int i = 0, k, cnt, max[100];
while(1){
scanf("%d", &n);
if(n == 0) break;
for(i = 7;i < n;i++){
if(isprime(k) == 1 && isprime(k - 2) == 1) max = k;
}
... | main.c: In function 'main':
main.c:13:18: error: 'n' undeclared (first use in this function)
13 | scanf("%d", &n);
| ^
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:54: error: assignment to expression with array type
16 | ... |
s089897600 | p00150 | C | #include <stdio.h>
int isprime(int n) {
int i;
for(i = 2; i * i <= n; i++) {
if(n % i == 0) return 0;
}
return 1;
}
int main(){
int i, n, max;
while(1){
scanf("%d", &n);
if(n == 0) break;
for(i = n;i > 0;i--){
if(isprime(i) == 1 && isprime(i - 2) == 1){
max = i;
... | main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
23 | }
| ^
|
s360043547 | p00150 | C | #include<stdio.h>
#include<math.h>
int Prime(int x){
int n;
if(x == 2)return 1;
if(x < 2 || x % 2 == 0)return 0;
for(n = 3; n <= sqrt((double)x); n += 2){
if(x % n == 0)return 0;
}
return 1;
}
int isprime(int n){
for(int i = 2; i * i <= n; i++){
if(n % i == 0) return 0;
}
return 1;
}
int main(){... | /usr/bin/ld: /tmp/cceRsCak.o: in function `Prime':
main.c:(.text+0x72): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
|
s378071471 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main(void){
int i,k,n,p1,q1;
for(i = 2; i <= MAX_V; i ++){
prime[i] = 1;
}
for(i = 2; i * i <= MAX_V; i ++ ){
if(prime[i]){
for(k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
}
... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V+1];
| ^~~~~
|
s177004373 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000; // 1??????????????°??´???°??¨?????????
int prime[MAX_V+1]; // 1???????´???°,0???????´???°????????°???????
int main(){
int i, k, n =10, cnt = 0;
int border[10];
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1; // 2??\?????°??´???°??¨??????
}
for(i = 2; i*i <= MAX_V; i++){
... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V+1]; // 1???????´???°,0???????´???°????????°???????
| ^~~~~
|
s990950716 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main(){
int i, k, n =10, cnt = 0;
int border[10];
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for(i = 2; i*i <= MAX_V; i++){
if(prime[i]) {
for(k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
//printf("prime[%d]=%d\n", k, prime[k]);... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V+1];
| ^~~~~
|
s373188540 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main(){
int i, k, n =10, cnt = 0;
int border[10];
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for(i = 2; i*i <= MAX_V; i++){
if(prime[i]) {
for(k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
}
}
}
int difference[MAX_V+1];
int i... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V+1];
| ^~~~~
|
s189238273 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V];
int main(){
int i, k, n =10, cnt = 0;
int border[10];
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for(i = 2; i*i <= MAX_V; i++){
if(prime[i]) {
for(k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
}
}
}
int difference[MAX_V+1];
int idx... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V];
| ^~~~~
|
s374092441 | p00150 | C | #include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V];
int main(){
int i, k, n =10, cnt = 0;
int border[10];
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for(i = 2; i*i <= MAX_V; i++){
if(prime[i]) {
for(k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
}
}
}
int difference[MAX_V+1];
int idx... | main.c:3:5: error: variably modified 'prime' at file scope
3 | int prime[MAX_V];
| ^~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.