submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s202764316
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i;
for (i = 0; i < 3; i++) {
scanf_s("%d %d", &a, &b);
a = a + b;
b = a / 10 + 1;
printf("%d\n", b);
a = 0;
b = 0;
}
}
|
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s246069279
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,n,l,i,j;
for(i=0;i<201;i++){
if(scanf("%d %d",a,b)=!0){
n=a+b;
for(j=0;n>0;j++){
n=n/10;
l++;
}
printf("%d\n",l);
}
else{
break;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:9:22: error: lvalue required as left operand of assignment
9 | if(scanf("%d %d",a,b)=!0){
| ^
|
s718431713
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,n,l,i,j;
for(i=0;i<201;i++){
break;
else{
if(scanf("%d %d",a,b)==0){
n=a+b;
for(j=0;n>0;j++){
n=n/10;
l++;
}
printf("%d\n",l);
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:11:1: error: 'else' without a previous 'if'
11 | else{
| ^~~~
|
s855370718
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,n,l,i,j;
for(i=0;i<201;i++){
if(scanf("%d %d",a,b)!=0){
n=a+b;
for(j=0;n>0;j++){
n=n/10;
l++;
}
printf("%d\n",l);
}
break;
else{
}
}
return 0;
}
|
main.c: In function 'main':
main.c:23:1: error: 'else' without a previous 'if'
23 | else{
| ^~~~
|
s164074608
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,n,l,i,j,flag;
//for(i=0;i<201;i++){
if(scanf("%d %d",a,b)==2){
n=a+b;
for(j=0;n>0;j++){
n=n/10;
l++;
}
printf("%d\n",l);
}
else{
flag=1;
break;
}
if(flag==1){
break;
}
//}
return 0;
}
|
main.c: In function 'main':
main.c:25:2: error: break statement not within loop or switch
25 | break;
| ^~~~~
main.c:29:1: error: break statement not within loop or switch
29 | break;
| ^~~~~
|
s793604437
|
p00002
|
C
|
#include<stdio.h>
int main(void)
{
int a, b, keta=0;
scanf("%d %d", &a, &b);
a = a + b;
while (a != 0) {
a/ = 10;
keta++;
}
printf("%d\n", keta);
return 0;
}
|
main.c: In function 'main':
main.c:8:20: error: expected expression before '=' token
8 | a/ = 10;
| ^
|
s945781108
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main()
{
int a, b;
while(scanf("%d %d", &a, &b) != EOF)
printf("%d\n", stdlen(str(a+b)));
return 0;
}
|
main.c: In function 'main':
main.c:9:20: error: implicit declaration of function 'stdlen'; did you mean 'strlen'? [-Wimplicit-function-declaration]
9 | printf("%d\n", stdlen(str(a+b)));
| ^~~~~~
| strlen
main.c:9:27: error: implicit declaration of function 'str' [-Wimplicit-function-declaration]
9 | printf("%d\n", stdlen(str(a+b)));
| ^~~
|
s947136557
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main()
{
int a, b;
while(scanf("%d %d", &a, &b) != EOF)
printf("%d\n", strlen(str(a+b)));
return 0;
}
|
main.c: In function 'main':
main.c:9:27: error: implicit declaration of function 'str' [-Wimplicit-function-declaration]
9 | printf("%d\n", strlen(str(a+b)));
| ^~~
main.c:9:27: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
9 | printf("%d\n", strlen(str(a+b)));
| ^~~~~~~~
| |
| int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s549151734
|
p00002
|
C
|
int main(void) {
int i,count;
int arr[3][MAX];
int dig[MAX];
// input
for (i=0; ; i++) {
printf("in\n");
if(scanf("%d %d", &arr[0][i], &arr[1][i]) == EOF) break;
arr[2][i] = arr[0][i] + arr[1][i];
count++;
}
// calc
for (i=0; i < count; ++i){
while (1) {
arr[2][i] /= 10;
printf("%d\n", arr[2][i]);
dig[i]++;
if(arr[2][i] == 0) break;
}
}
//output
for (i = 0; i < count; ++i) {
printf("%d\n", dig[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:3:20: error: 'MAX' undeclared (first use in this function)
3 | int arr[3][MAX];
| ^~~
main.c:3:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("in\n");
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | int main(void) {
main.c:8:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | printf("in\n");
| ^~~~~~
main.c:8:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:20: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
9 | if(scanf("%d %d", &arr[0][i], &arr[1][i]) == EOF) break;
| ^~~~~
main.c:9:20: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:20: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:9:20: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:62: error: 'EOF' undeclared (first use in this function)
9 | if(scanf("%d %d", &arr[0][i], &arr[1][i]) == EOF) break;
| ^~~
main.c:9:62: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:18:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
18 | printf("%d\n", arr[2][i]);
| ^~~~~~
main.c:18:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
27 | printf("%d\n", dig[i]);
| ^~~~~~
main.c:27:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s226711576
|
p00002
|
C
|
include <stdio.h>
#define MAX 200
int main(void) {
int i,count;
int arr[3][MAX];
int dig[MAX];
// input
for (i=0; ; i++) {
if(scanf("%d %d", &arr[0][i], &arr[1][i]) == EOF) break;
arr[2][i] = arr[0][i] + arr[1][i];
count++;
}
// calc
for (i=0; i < count; ++i){
while (1) {
arr[2][i] /= 10;
dig[i]++;
if(arr[2][i] == 0) break;
}
}
//output
for (i = 0; i < count; ++i) {
printf("%d\n", dig[i]);
}
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s099006267
|
p00002
|
C
|
File Edit Options Buffers Tools C Help
#include <stdio.h>
#define MAX 200
int main(void) {
int i,count;
int arr[3][MAX];
int dig[MAX];
// input
for(i=0; scanf("%d %d", &arr[0][i], &arr[1][i]) != EOF; i++) {
arr[2][i] = arr[0][i] + arr[1][i];
count++;
}
// calc
for (i=0; i < count; ++i){
while (1) {
arr[2][i] /= 10;
dig[i]++;
if(arr[2][i] == 0) break;
}
}
//output
for (i = 0; i < count; ++i) {
printf("%d\n", dig[i]);
}
return 0;
}
|
main.c:1:1: error: unknown type name 'File'
1 | File Edit Options Buffers Tools C Help
| ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Options'
1 | File Edit Options Buffers Tools C Help
| ^~~~~~~
main.c:1:11: error: unknown type name 'Options'
In file included from /usr/include/stdio.h:47,
from main.c:2:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
+++ |+#include <stddef.h>
1 | /* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: error: unknown type name 'size_t'
37 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:57:3: error: unknown type name 'cookie_read_function_t'; did you mean 'cookie_seek_function_t'?
57 | cookie_read_function_t *read; /* Read bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~
| cookie_seek_function_t
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:58:3: error: unknown type name 'cookie_write_function_t'; did you mean 'cookie_close_function_t'?
58 | cookie_write_function_t *write; /* Write bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~~
| cookie_close_function_t
/usr/include/stdio.h:314:35: error: unknown type name 'size_t'
314 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
| ^~~~~~
/usr/include/stdio.h:130:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
129 | #include <bits/stdio_lim.h>
+++ |+#include <stddef.h>
130 |
/usr/include/stdio.h:320:47: error: unknown type name 'size_t'
320 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
| ^~~~~~
/usr/include/stdio.h:320:47: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:340:34: error: unknown type name 'size_t'
340 | int __modes, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:340:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:346:24: error: unknown type name 'size_t'
346 | size_t __size) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:346:24: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:385:44: error: unknown type name 'size_t'
385 | extern int snprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:385:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:389:45: error: unknown type name 'size_t'
389 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:389:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:690:30: error: unknown type name 'size_t'
690 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:690:30: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:693:28: error: unknown type name 'size_t'
693 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:693:28: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:698:27: error: unknown type name 'size_t'
698 | size_t *__restrict __n,
| ^~~~~~
/usr/include/stdio.h:698:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:8: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:46: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:729:22: error: unknown type name 'size_t'
729 | size_t __n, FILE *__restrict __stream) __wur
| ^~~~~~
/usr/include/stdio.h:729:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:8: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:53: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:736:23: error: unknown type name 'size_t'
736 | size_t __n, FILE *__restrict __s) __nonnull((4));
| ^~~~~~
/usr/include/stdio.h:736:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:8: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:55: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:757:31: error: unknown type name 'size_t'
757 | size_t __n, FILE *__restrict __stream) __wur
| ^~~~~~
/usr/include/stdio.h:757:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:759:8: error: unknown type name 'size_t'
759 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:759:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:759:62: error: unknown type name 'size_t'
759 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:759:62: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:760:32: error: unknown type name 'size_t'
760 | size_t __n, FILE *__restrict __stream)
| ^~~~~~
/usr/include/stdio.h:760:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
|
s021389440
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,i,R;
while(scanf("%d %d",&a,&b)!=EOF){
R=a+b;
for(i=0;R!=0;i++)
?????????? R=R/10;
?????? ??printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:1: error: expected expression before '?' token
7 | ?????????? R=R/10;
| ^
main.c:8:1: error: expected expression before '?' token
8 | ?????? ??printf("%d\n",i);
| ^
|
s978672062
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,i,k=0;
while(scanf("%d %d",&a,&b)!=EOF){
k=a+b;
for(i=0;k!=0;i++){
?????????? k = k/10;
}
?????? ??printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:1: error: expected expression before '?' token
7 | ?????????? k = k/10;
| ^
main.c:9:1: error: expected expression before '?' token
9 | ?????? ??printf("%d\n",i);
| ^
|
s684523167
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,i,k=0;
while(scanf("%d %d",&a,&b)!=EOF){
k=a+b;
?????????? while(k!=0){
k=k/10;
}
?????? ??printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:1: error: expected expression before '?' token
6 | ?????????? while(k!=0){
| ^
|
s544659019
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,digit;
digit=0
while(scanf("%d %d\n", &a, &b) != EOF){
scanf("%d %d",&a,&b);
while(a+b!=0)
{
a+b=(a+b)/10;
digit+=digit;
}
printf("%d\n",digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:8: error: expected ';' before 'while'
6 | digit=0
| ^
| ;
7 | while(scanf("%d %d\n", &a, &b) != EOF){
| ~~~~~
|
s180051517
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,digit;
digit=0;
while(scanf("%d %d\n", &a, &b) != EOF){
scanf("%d %d",&a,&b);
while(a+b!=0)
{
a+b=(a+b)/10;
digit+=digit;
}
printf("%d\n",digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:12:9: error: lvalue required as left operand of assignment
12 | a+b=(a+b)/10;
| ^
|
s811196594
|
p00002
|
C
|
#include<stdio.h>
int main(){
int num,a,b,digits;
digits=1;
while(scanf("%d %d",&a,&b)!=EOF){
num=a+b
while(num/10!=0)
digits++;
}
printf("%d\n",digits);
return 0;
}
|
main.c: In function 'main':
main.c:7:24: error: expected ';' before 'while'
7 | num=a+b
| ^
| ;
8 | while(num/10!=0)
| ~~~~~
|
s935425873
|
p00002
|
C
|
#include<stdio.h>
int main() {
int a[200],b[200],i,count=0,c,waru=1count_waru=0;
while(scanf("%d%d",&a[i],b[i])==EOF)
count++;
for(i=0;i<count;i++){
c=a[i]+b[i];
while(c%waru==0){
waru*=10;
count_waru++;
}
printf("%d\n",count_waru);
coun_waru=0;
waru=1;
}
return 0;
}
|
main.c: In function 'main':
main.c:5:36: error: invalid suffix "count_waru" on integer constant
5 | int a[200],b[200],i,count=0,c,waru=1count_waru=0;
| ^~~~~~~~~~~
main.c:15:1: error: 'count_waru' undeclared (first use in this function)
15 | count_waru++;
| ^~~~~~~~~~
main.c:15:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:1: error: 'coun_waru' undeclared (first use in this function)
18 | coun_waru=0;
| ^~~~~~~~~
|
s277531413
|
p00002
|
C
|
#include<stdio.h>
int main() {
int a[200],b[200],i,count=0,c,waru=1,count_waru=0;
while(scanf("%d%d",&a[i],b[i])==EOF)
count++;
for(i=0;i<count;i++){
c=a[i]+b[i];
while(c%waru==0){
waru*=10;
count_waru++;
}
printf("%d\n",count_waru);
coun_waru=0;
waru=1;
}
return 0;
}
|
main.c: In function 'main':
main.c:18:1: error: 'coun_waru' undeclared (first use in this function); did you mean 'count_waru'?
18 | coun_waru=0;
| ^~~~~~~~~
| count_waru
main.c:18:1: note: each undeclared identifier is reported only once for each function it appears in
|
s160652259
|
p00002
|
C
|
#include <stdio.h>
int main(){
  int a,b,n,i;
  while(scanf("%d%d",&a,&b) != EOF){
    n = a + b;
    i = 1;
    while(n/=10)
      i++;
    printf("%d\n",i);
  }
  return 0;
}
|
main.c: In function 'main':
main.c:3:2: error: stray '#' in program
3 |   int a,b,n,i;
| ^
main.c:3:1: error: lvalue required as unary '&' operand
3 |   int a,b,n,i;
| ^
main.c:3:8: error: stray '#' in program
3 |   int a,b,n,i;
| ^
main.c:3:7: error: lvalue required as unary '&' operand
3 |   int a,b,n,i;
| ^
main.c:4:2: error: stray '#' in program
4 |   while(scanf("%d%d",&a,&b) != EOF){
| ^
main.c:4:1: error: lvalue required as unary '&' operand
4 |   while(scanf("%d%d",&a,&b) != EOF){
| ^
main.c:4:8: error: stray '#' in program
4 |   while(scanf("%d%d",&a,&b) != EOF){
| ^
main.c:4:7: error: lvalue required as unary '&' operand
4 |   while(scanf("%d%d",&a,&b) != EOF){
| ^
main.c:5:2: error: stray '#' in program
5 |     n = a + b;
| ^
main.c:5:1: error: lvalue required as unary '&' operand
5 |     n = a + b;
| ^
main.c:5:8: error: stray '#' in program
5 |     n = a + b;
| ^
main.c:5:7: error: lvalue required as unary '&' operand
5 |     n = a + b;
| ^
main.c:5:14: error: stray '#' in program
5 |     n = a + b;
| ^
main.c:5:13: error: lvalue required as unary '&' operand
5 |     n = a + b;
| ^
main.c:5:20: error: stray '#' in program
5 |     n = a + b;
| ^
main.c:5:19: error: lvalue required as unary '&' operand
5 |     n = a + b;
| ^
main.c:6:2: error: stray '#' in program
6 |     i = 1;
| ^
main.c:6:1: error: lvalue required as unary '&' operand
6 |     i = 1;
| ^
main.c:6:8: error: stray '#' in program
6 |     i = 1;
| ^
main.c:6:7: error: lvalue required as unary '&' operand
6 |     i = 1;
| ^
main.c:6:14: error: stray '#' in program
6 |     i = 1;
| ^
main.c:6:13: error: lvalue required as unary '&' operand
6 |     i = 1;
| ^
main.c:6:20: error: stray '#' in program
6 |     i = 1;
| ^
main.c:6:19: error: lvalue required as unary '&' operand
6 |     i = 1;
| ^
main.c:7:2: error: stray '#' in program
7 |     while(n/=10)
| ^
main.c:7:1: error: lvalue required as unary '&' operand
7 |     while(n/=10)
| ^
main.c:7:8: error: stray '#' in program
7 |     while(n/=10)
| ^
main.c:7:7: error: lvalue required as unary '&' operand
7 |     while(n/=10)
| ^
main.c:7:14: error: stray '#' in program
7 |     while(n/=10)
| ^
main.c:7:13: error: lvalue required as unary '&' operand
7 |     while(n/=10)
| ^
main.c:7:20: error: stray '#' in program
7 |     while(n/=10)
| ^
main.c:7:19: error: lvalue required as unary '&' operand
7 |     while(n/=10)
| ^
main.c:8:2: error: stray '#' in program
8 |       i++;
| ^
main.c:8:1: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:8:8: error: stray '#' in program
8 |       i++;
| ^
main.c:8:7: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:8:14: error: stray '#' in program
8 |       i++;
| ^
main.c:8:13: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:8:20: error: stray '#' in program
8 |       i++;
| ^
main.c:8:19: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:8:26: error: stray '#' in program
8 |       i++;
| ^
main.c:8:25: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:8:32: error: stray '#' in program
8 |       i++;
| ^
main.c:8:31: error: lvalue required as unary '&' operand
8 |       i++;
| ^
main.c:9:2: error: stray '#' in program
9 |     printf("%d\n",i);
| ^
main.c:9:1: error: lvalue required as unary '&' operand
9 |     printf("%d\n",i);
| ^
main.c:9:8: error: stray '#' in program
9 |     printf("%d\n",i);
| ^
main.c:9:7: error: lvalue required as unary '&' operand
9 |     printf("%d\n",i);
| ^
main.c:9:14: error: stray '#' in program
9 |     printf("%d\n",i);
| ^
main.c:9:13: error: lvalue required as unary '&' operand
9 |     printf("%d\n",i);
| ^
main.c:9:20: error: stray '#' in program
9 |     printf("%d\n",i);
| ^
main.c:9:19: error: lvalue required as unary '&' operand
9 |     printf("%d\n",i);
| ^
main.c:10:2: error: stray '#' in program
10 |   }
| ^
main.c:10:1: error: lvalue required as unary '&' operand
10 |   }
| ^
main.c:10:8: error: stray '#' in program
10 |   }
| ^
main.c:10:7: error: lvalue required as unary '&' operand
10 |   }
| ^
main.c:11:2: error: stray '#' in program
11 |   return 0;
| ^
main.c:11:1: error: lvalue required as unary '&' operand
11 |   return 0;
| ^
main.c:11:8: error: stray '#' in program
11 |   return 0;
| ^
main.c:11:7: error: lvalue required as unary '&' operand
11 |   return 0;
| ^
|
s573325599
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main () {
int i, n = 0;
int data[1000];
while(1) {
if ( scanf("%d %d", &data[n], &data[n+1]) == EOF )
break;
n += 2;
}
for ( i = 0; i < n; i += 2 ) {
/*
int sum = data[i] + data[i+1];
int digit = 0;
while( sum >= 10 ) {
sum -= 10;
// sum /= 10;
digit++;
}
*/
printf("%d\n", digit);
}
return 1;
}
|
main.c: In function 'main':
main.c:25:24: error: 'digit' undeclared (first use in this function)
25 | printf("%d\n", digit);
| ^~~~~
main.c:25:24: note: each undeclared identifier is reported only once for each function it appears in
|
s491825671
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b;
int i,tmp;
while(scanf("%d %d",&a,&b)==EOF){
tmp=a+b;
for(i=0;tmp!=0;i++){
tmp/=10;
}
ptintf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
11 | ptintf("%d\n",i);
| ^~~~~~
| printf
|
s081487830
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a[200].b[200];
int i,j,tmp;
for(i=0;i<200;i++){
a[i]=0;
b[i]=0;
}
for(i=0;i<200;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<200&&a[i]+b[i]!=0;i++){
tmp=a[i]+b[i];
for(i=0;tmp!=0;i++){
tmp/=10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
4 | int a[200].b[200];
| ^
main.c:4:13: error: expected expression before '.' token
main.c:7:5: error: 'a' undeclared (first use in this function)
7 | a[i]=0;
| ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: 'b' undeclared (first use in this function)
8 | b[i]=0;
| ^
|
s160006023
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a[200].b[200];
int i,j,tmp;
for(i=0;i<200;i++){
a[i]=0;
b[i]=0;
}
for(i=0;i<200;i++){
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<200&&a[i]+b[i]!=0;i++){
tmp=a[i]+b[i];
for(j=0;tmp!=0;j++){
tmp/=10;
}
printf("%d\n",j);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
4 | int a[200].b[200];
| ^
main.c:4:13: error: expected expression before '.' token
main.c:7:5: error: 'a' undeclared (first use in this function)
7 | a[i]=0;
| ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: 'b' undeclared (first use in this function)
8 | b[i]=0;
| ^
|
s310254473
|
p00002
|
C
|
#include <stdio.h>
int main (void)
{
int sum1 = 0, d1 = 0;
int sum2 = 0, d2 = 0;
int sum3 = 0, d3 = 0;
int i1, i2, i3, j1, j2, j3, d1, d2, d3;
scanf("%d %d", &i1, &j1);
scanf("%d %d", &i2, &j2);
scanf("%d %d", &i3, &j3);
sum1 = i1 + j1;
sum2 = i2 + j2;
sum3 = i3 + j3;
while(sum1 != 0){
sum1 /= 10;
d1++;
}
while(sum2 != 0){
sum2 /= 10;
d2++;
}
while(sum3 != 0){
sum3 /= 10;
d3++;
}
printf("%d\n", d1);
printf("%d\n", d2);
printf("%d\n", d3);
return 0;
}
|
main.c: In function 'main':
main.c:7:31: error: redeclaration of 'd1' with no linkage
7 | int i1, i2, i3, j1, j2, j3, d1, d2, d3;
| ^~
main.c:4:17: note: previous definition of 'd1' with type 'int'
4 | int sum1 = 0, d1 = 0;
| ^~
main.c:7:35: error: redeclaration of 'd2' with no linkage
7 | int i1, i2, i3, j1, j2, j3, d1, d2, d3;
| ^~
main.c:5:17: note: previous definition of 'd2' with type 'int'
5 | int sum2 = 0, d2 = 0;
| ^~
main.c:7:39: error: redeclaration of 'd3' with no linkage
7 | int i1, i2, i3, j1, j2, j3, d1, d2, d3;
| ^~
main.c:6:17: note: previous definition of 'd3' with type 'int'
6 | int sum3 = 0, d3 = 0;
| ^~
|
s348720869
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void) {
while(feof()!=0){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",log10(a+b));
}
return 0;
}
|
main.c: In function 'main':
main.c:6:15: error: too few arguments to function 'feof'
6 | while(feof()!=0){
| ^~~~
In file included from main.c:1:
/usr/include/stdio.h:852:12: note: declared here
852 | extern int feof (FILE *__stream) __THROW __wur __nonnull ((1));
| ^~~~
|
s442252793
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main()
{
int i=0;
char a[9][200];
char b[9][200];
int length_a=0;
int length_b=0;
while (scanf("%s %s", a+i, b+i) != EOF) {
i++;
}
for(j=0;j<i;j++)
{
printf("%d\n",strlen(a[i])+strlen(b[i]));
}
return 0;
}
|
main.c: In function 'main':
main.c:17:13: error: 'j' undeclared (first use in this function)
17 | for(j=0;j<i;j++)
| ^
main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
|
s921469557
|
p00002
|
C
|
#include<stdio.h>
int main ()
{int a,b,sum, count;
int input = scanf("%d %d", &a,&b);
while (input != EOF) {
sum = a + b;
count = 0;
while (sum != 0) {
count += 1;
sum = sum / 10;
}
printf("%d\n", count);
input = scanf("%d %d", &a,&b);
}
|
main.c: In function 'main':
main.c:14:1: error: expected declaration or statement at end of input
14 | }
| ^
|
s930764503
|
p00002
|
C
|
#include<stdio.h>
int main ()
int a,b,sum, count;
scanf("%d %d", &a,&b);
while (input != EOF) {
sum = a + b;
count = 0;
while (sum != 0) {
count += 1;
sum = sum / 10;
}
printf("%d\n", count);
input = scanf("%d %d", &a,&b);
return 0; }
|
main.c: In function 'main':
main.c:4:2: error: expected declaration specifiers before 'scanf'
4 | scanf("%d %d", &a,&b);
| ^~~~~
main.c:5:1: error: expected declaration specifiers before 'while'
5 | while (input != EOF) {
| ^~~~~
main.c:3:14: error: declaration for parameter 'count' but no such parameter
3 | int a,b,sum, count;
| ^~~~~
main.c:3:9: error: declaration for parameter 'sum' but no such parameter
3 | int a,b,sum, count;
| ^~~
main.c:3:7: error: declaration for parameter 'b' but no such parameter
3 | int a,b,sum, count;
| ^
main.c:3:5: error: declaration for parameter 'a' but no such parameter
3 | int a,b,sum, count;
| ^
main.c:15: error: expected '{' at end of input
|
s397438652
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a, b, sum, count = 1;
for (int i = 1; i <= 200;){
scanf_s("%d %d", &a, &b);
if (0 <= a, b <= 1000000){
sum = a + b;
for (;;){
if (sum / 10 == 0){
break;
}
else{
sum /= 10;
count++;
}
}
printf("%d\n", count);
count = 1;
i++;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s700908755
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a, b, sum, count = 1;
for (int i = 1; i <= 200;){
scanf_s("%d %d", &a, &b);
if (0 <= a, b <= 1000000){
sum = a + b;
for (;;){
if (sum / 10 == 0){
break;
}
else{
sum /= 10;
count++;
}
}
printf("%d\n", count);
count = 1;
i++;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s547314173
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a, b, sum, count = 1;
int i;
for (i = 1; i <= 200;){
scanf_s("%d %d", &a, &b);
if (0 <= a, b <= 1000000){
sum = a + b;
for (;;){
if (sum / 10 == 0){
break;
}
else{
sum /= 10;
count++;
}
}
printf("%d\n", count);
count = 1;
i++;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s693515962
|
p00002
|
C
|
#include <stdio.h
int main()
{
}
|
main.c:1:18: error: missing terminating > character
1 | #include <stdio.h
| ^
|
s749470078
|
p00002
|
C
|
#include <stdio.h>
int main()
{
int a,b,c,count;
scanf("%d %d",&a,&b);
c = a+b;
for(count = 0;c>0;count++){
c /= 10
}
printf("%d\n",count);
}
|
main.c: In function 'main':
main.c:10:14: error: expected ';' before '}' token
10 | c /= 10
| ^
| ;
11 | }
| ~
|
s888282517
|
p00002
|
C
|
#include <stdio.h>
int main()
{
int a,b,c;
int n = 0;
while(scanf("%d%d",&a,&b) != EOF){
c = a + b;
while( c != 0){{
c = c / 10;
++n;
}
printf("%d\n",n);
}
}
return 0;
|
main.c: In function 'main':
main.c:22:3: error: expected declaration or statement at end of input
22 | return 0;
| ^~~~~~
|
s562321461
|
p00002
|
C
|
#include <stdio.h>
int main()
{
int a,b,c;
int n;
while(scanf("%d%d",&a,&b) != EOF){
c = a + b;
for(n = 0 ; c > 0 ; ++n )
{
c /= 10;
}
printf("%d\n",n);
}
return 0;
|
main.c: In function 'main':
main.c:21:3: error: expected declaration or statement at end of input
21 | return 0;
| ^~~~~~
|
s435774583
|
p00002
|
C
|
#include <stdio.h>
int main()
{
int a,b,c;
int n = 0;
while(scanf("%d%d",&a,&b) != EOF){
c = a + b;
for(n = 0 ; c > 0 ; ++n )
{
c /= 10;
}
printf("%d\n",n);
}
return 0;
|
main.c: In function 'main':
main.c:21:3: error: expected declaration or statement at end of input
21 | return 0;
| ^~~~~~
|
s482787292
|
p00002
|
C
|
include <stdio.h>
int main()
{
int a,b,c;
int n = 0;
while(scanf("%d%d",&a,&b) != EOF){
c = a + b;
for(n = 0 ; c > 0 ; ++n )
{
c /= 10;
}
printf("%d\n",n);
}
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s244591661
|
p00002
|
C
|
#include <stdio.h>
int main()
{
int a,b;
int n = 0;
while(scanf("%d%d",&a,&b) != EOF)
for(n = 0 ; (a + b) > 0 ; ++n )
{
(a + b) /= 10;
}
printf("%d\n",n);
return 0;
}
|
main.c: In function 'main':
main.c:13:17: error: lvalue required as left operand of assignment
13 | (a + b) /= 10;
| ^~
|
s877617530
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c;
while(scanf("%d%d",&a,&b) != EOF)
{
for(c=1;c<a+b;c*10){}
printf("%d\n",c-1);
}
return 0
}
|
main.c: In function 'main':
main.c:10:11: error: expected ';' before '}' token
10 | return 0
| ^
| ;
11 | }
| ~
|
s000665899
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c=1,d=0;
while(scanf("%d%d",&a,&b) != EOF)
{
while(c<a+b)
{
c*=10;
d++;
}
printf("%d\n",d);
}
return 0
}
|
main.c: In function 'main':
main.c:14:11: error: expected ';' before '}' token
14 | return 0
| ^
| ;
15 | }
| ~
|
s816678307
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c=1,d=0;
scanf("%d%d",&a,&b)
while(c<=a+b)
{
c*=10;
d++;
}
printf("%d\n",d);
return 0
}
|
main.c: In function 'main':
main.c:5:22: error: expected ';' before 'while'
5 | scanf("%d%d",&a,&b)
| ^
| ;
6 | while(c<=a+b)
| ~~~~~
main.c:13:11: error: expected ';' before '}' token
13 | return 0
| ^
| ;
14 | }
| ~
|
s287647365
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c=1,d=0;
while (scanf("%d%d",&a,&b) != EOF)
{
if(a+b==0) d=1;
else
{
while(a+b/c != 0)
{
c*=10;
d++;
}
printf("%d\n",d);
}
return 0;
}
|
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s132658042
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c=1,d=0;
while (scanf("%d%d",&a,&b) != EOF)
{
if(a+b==0) d=1;
else
{
while((a+b)/c != 0)
{
c*=10;
d++;
}
printf("%d\n",d);
}
return 0;
}
|
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s052545710
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,n,s,c;
scanf("%d%d",&a,%b);
s=a+b;
for(n=1;n<=s;n*10){
c=c+1;
}
printf("%d\n",c);
return 0;
}
|
main.c: In function 'main':
main.c:4:17: error: expected expression before '%' token
4 | scanf("%d%d",&a,%b);
| ^
|
s532742849
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,n,s,c=0;
scanf("%d%d",&a,%b);
s=a+b;
for(n=1;n<=s;n*10){
c=c+1;
}
printf("%d\n",c);
return 0;
}
|
main.c: In function 'main':
main.c:4:17: error: expected expression before '%' token
4 | scanf("%d%d",&a,%b);
| ^
|
s332363809
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,n,s,c=1;
scanf("%d%d",&a,%b);
s=a+b;
if(s<=9){
c==;
}else{
for(n=1;n<=s;n*10){
c=c+1;
}
}
printf("%d\n",c);
return 0;
}
|
main.c: In function 'main':
main.c:4:17: error: expected expression before '%' token
4 | scanf("%d%d",&a,%b);
| ^
main.c:7:4: error: expected expression before ';' token
7 | c==;
| ^
|
s025937908
|
p00002
|
C
|
#include <stdio.h>
int main(){
int varA[] = {0}, varB[] = {0};
int varSum[] = {0};
int varDigit = 0;
int comp = 1;
int i = 0;
while(i < 3){
scanf("%d %d", &varA[i], &varB[i]);
varSum[i] = varA[i] + varB[i];
i++;
}
for(i = 0; i < 10; i++){
comp *= 10;
varDigit++;
if((varSum % comp) == varSum){
break;
}
}
printf("%d\n", varDigit);
return 0;
}
|
main.c: In function 'main':
main.c:16:28: error: invalid operands to binary % (have 'int *' and 'int')
16 | if((varSum % comp) == varSum){
| ~~~~~~ ^
| |
| int *
|
s544895883
|
p00002
|
C
|
#include <stdio.h>
int main(){
int varA[3] = {0}, varB[3] = {0};
int varSum[3] = {0};
int varDigit = 0;
int comp = 1;
int i = 0;
while(i < 3){
scanf("%d %d", &varA[i], &varB[i]);
varSum[i] = varA[i] + varB[i];
i++;
}
for(i = 0; i < 10; i++){
comp *= 10;
varDigit++;
if((varSum % comp) == varSum){
break;
}
}
printf("%d\n", varDigit);
return 0;
}
|
main.c: In function 'main':
main.c:16:28: error: invalid operands to binary % (have 'int *' and 'int')
16 | if((varSum % comp) == varSum){
| ~~~~~~ ^
| |
| int *
|
s738412384
|
p00002
|
C
|
#include <stdio.h>
int main(){
int varA[3] = {0}, varB[3] = {0};
int varSum[3] = {0};
int varDigit = 0;
int comp = 1;
int i = 0;
while(i < 3){
scanf("%d%d", &varA[i], &varB[i]);
varSum[i] = varA[i] + varB[i];
i++;
}
for(i = 0; i < 10; i++){
comp *= 10;
varDigit++;
if((varSum % comp) == varSum){
break;
}
}
printf("%d\n", varDigit);
return 0;
}
|
main.c: In function 'main':
main.c:16:28: error: invalid operands to binary % (have 'int *' and 'int')
16 | if((varSum % comp) == varSum){
| ~~~~~~ ^
| |
| int *
|
s894083123
|
p00002
|
C
|
#include <stdio.h>
int main(){
int varA[3] = {0}, varB[3] = {0};
int varSum[3] = {0};
int varDigit[3] = {0};
int comp = 1;
int i = 0;
while(i < 3){
scanf("%d%d",&varA[i],&varB[i]);
varSum[i] = varA[i] + varB[i];
i++;
}
for(j = 0; j < 3; j++){
comp = 1;
for(i = 0; i < 10; i++){
comp *= 10;
varDigit[j]++;
if((varSum[j] % comp) == varSum[j]){
break;
}
}
}
printf("%d\n%d\n%d\n",varDigit[0],varDigit[1],varDigit[2]);
return 0;
}
|
main.c: In function 'main':
main.c:13:13: error: 'j' undeclared (first use in this function)
13 | for(j = 0; j < 3; j++){
| ^
main.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
|
s228875684
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
int main(int argv,char *argc[]){
int i;
int a,b,c;
int count=1;
while(1){
c = scanf("%d %d",&a,&b);
if(c == EOF){
break;
}
count=1;
while(1){
if((a+b)>pow(10,double(count))){
count++;
}else{
printf("%d\n",count);
break;
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:20:41: error: expected expression before 'double'
20 | if((a+b)>pow(10,double(count))){
| ^~~~~~
|
s653889875
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
int main(int argv,char *argc[]){
int i;
int a,b,c;
int count=1;
while(1){
c = scanf("%d %d",&a,&b);
if(c != 2){
break;
}
count=1;
while(1){
if((a+b)>pow(10,double(count))){
count++;
}else{
printf("%d\n",count);
break;
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:20:41: error: expected expression before 'double'
20 | if((a+b)>pow(10,double(count))){
| ^~~~~~
|
s211335791
|
p00002
|
C
|
include <stdio.h>
int main(void)
{
int a, b, c;
int count=1;
scanf("%d %d", &a, &b);
c = a + b;
while(1)
{
c = c/10;
if(c > 0)
count++;
else
break;
}
printf("%d\n", count);
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s585934509
|
p00002
|
C
|
include <stdio.h>
int main(void)
{
int a, b, c;
int count=1;
scanf("%d %d", &a, &b);
c = a + b;
while(1)
{
c = c/10;
if(c > 0)
count++;
else
break;
}
printf("%d\n", count);
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s013968354
|
p00002
|
C
|
include <stdio.h>
int main(void)
{
int a, b, c;
int count=1;
scanf("%d %d", &a, &b);
c = a + b;
while(1)
{
c = c/10;
if(c != 0 )
count++;
else
break;
}
printf("%d\n", count);
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s227496282
|
p00002
|
C
|
#include<stdio.h>
#define DATASET 200
int main(void)
{
int a,b,n,i,k=0;
for(i=0,i,DATASET,i++)
{
scanf("%d %d",&a,&b);
}
n=a+b;
while(n!=0)
{
n=n/10;
k++;
}
printf("%d",k);
}
|
main.c: In function 'main':
main.c:8:22: error: expected ';' before ')' token
8 | for(i=0,i,DATASET,i++)
| ^
| ;
main.c:8:22: error: expected expression before ')' token
|
s128808457
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i,j;
while(scanf("%d %d",&a,&b)!=EOF)
{
for(i=1;a!<10;)
{
if(a%10==0)
{
a=a%10;
}
else
{
a=a%10;
i++;
}
}
for(j=1;b!<10;)
{
if(b%10==0)
{
b=b%10;
}
else
{
b=b%10;
j++;
}
}
printf("%d\n",i+j);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:18: error: expected ';' before '!' token
7 | for(i=1;a!<10;)
| ^
| ;
main.c:19:18: error: expected ';' before '!' token
19 | for(j=1;b!<10;)
| ^
| ;
|
s054940269
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,i;
for(){
scanf("%d\n",a);
for(i=0;a!=0;i++) a=(int)(a/10);
printf("%d\n",i);
return 0;
}
|
main.c: In function 'main':
main.c:5:5: error: expected expression before ')' token
5 | for(){
| ^
main.c:5:5: error: expected expression before ')' token
main.c:10:1: error: expected declaration or statement at end of input
10 | }
| ^
|
s193492332
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main(void){
int a[200],b[200],n[200],i,l[200];
for(i=0;i<200;i++){
scanf("%d %d",&a[i],&b[i]);
n[i]=a[i]+b[i];
char c[i]=n[i]+'0';
}
for(i=0;i<200;i++){
l[i]=strlen(c[i]);
printf("%d\n",l[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:10:19: error: variable-sized object may not be initialized except with an empty initializer
10 | char c[i]=n[i]+'0';
| ^
main.c:14:14: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
14 | l[i]=strlen(c[i]);
| ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
2 | #include <stdlib.h>
+++ |+#include <string.h>
3 |
main.c:14:14: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
14 | l[i]=strlen(c[i]);
| ^~~~~~
main.c:14:14: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:14:21: error: 'c' undeclared (first use in this function)
14 | l[i]=strlen(c[i]);
| ^
main.c:14:21: note: each undeclared identifier is reported only once for each function it appears in
|
s559293288
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(){
int a, b;
char c[16];
while(scanf("%d %d", &a, &b) != EOF) {
sprintf(c, "%d", a+b);
printf("%d\n", strlen(buf));
}
return 0;
}
|
main.c: In function 'main':
main.c:10:31: error: 'buf' undeclared (first use in this function)
10 | printf("%d\n", strlen(buf));
| ^~~
main.c:10:31: note: each undeclared identifier is reported only once for each function it appears in
|
s535778512
|
p00002
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, total, dig;
while(scanf("%d%d", &a, &b)!=EOF){
d=0; total = a+b;
while(total){
d++;
total /= 10;
}
printf("%d\n", d);
}
return 0;
}
|
main.c: In function 'main':
main.c:8:9: error: 'd' undeclared (first use in this function)
8 | d=0; total = a+b;
| ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
|
s597168359
|
p00002
|
C
|
#include<stdio.h>
int main(void)
{
int i = 0, a, b, c, n;
while(scanf("%d %d", &a, &b) != -1){
c[i] = a + b;
for(n = 0; c != 0; n++){
c = c / 10;
}
printf("%d", n);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:18: error: subscripted value is neither array nor pointer nor vector
7 | c[i] = a + b;
| ^
|
s456107907
|
p00002
|
C
|
#include<stdio.h>
#include<math.h>
int main()
{
int a, b;
int i;
while (true)
{
if (scanf("%d",&a))
{
scanf("%d", &b);
i = 0;
while (pow(10,i)<a+b)
{
i++;
}
printf("%d", i - 1);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:7:16: error: 'true' undeclared (first use in this function)
7 | while (true)
| ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include<math.h>
+++ |+#include <stdbool.h>
3 | int main()
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
7 | while (true)
| ^~~~
|
s003395940
|
p00002
|
C
|
#include<stdio.h>
#include<math.h>
int main()
{
int a, b;
int i;
while (true)
{
if (scanf("%d",&a)!=EOF)
{
scanf("%d", &b);
i = 0;
while (pow(10,i)<a+b)
{
i++;
}
printf("%d", i - 1);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:7:16: error: 'true' undeclared (first use in this function)
7 | while (true)
| ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include<math.h>
+++ |+#include <stdbool.h>
3 | int main()
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
7 | while (true)
| ^~~~
|
s593976771
|
p00002
|
C
|
#include <stdio.h>
int main(void) {
while(){
int a = -1,b = 0,c = 0,i,n = 10;
scanf("%d%d",&a,&b);
c = a + b;
if(c < 10){
printf("1\n");
return 0;
}
for(i = 2;;i++){
n *= 10;
if(c < n){
printf("i\n");
break;
}
}
if(a = -1){
break;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:4:15: error: expected expression before ')' token
4 | while(){
| ^
main.c:6:31: error: 'a' undeclared (first use in this function)
6 | scanf("%d%d",&a,&b);
| ^
main.c:6:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:34: error: 'b' undeclared (first use in this function)
6 | scanf("%d%d",&a,&b);
| ^
main.c:7:17: error: 'c' undeclared (first use in this function)
7 | c = a + b;
| ^
main.c:12:21: error: 'i' undeclared (first use in this function)
12 | for(i = 2;;i++){
| ^
main.c:13:25: error: 'n' undeclared (first use in this function)
13 | n *= 10;
| ^
|
s519362963
|
p00002
|
C
|
a,b=input().strip().split()
a=int(a)
b=int(b)
sum = a+b
sum = str(sum)
print(len(sum))
|
main.c:1:1: warning: data definition has no type or storage class
1 | a,b=input().strip().split()
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | a,b=input().strip().split()
| ^
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
1 | a,b=input().strip().split()
| ^~~~~
main.c:1:12: error: request for member 'strip' in something not a structure or union
1 | a,b=input().strip().split()
| ^
main.c:2:1: error: expected ',' or ';' before 'a'
2 | a=int(a)
| ^
|
s251278764
|
p00002
|
C
|
main(a,b){
for(;scanf("%d%d",&a,&b)!= EOF;){
for(a+=b,b=0;a>0;a/=10,b++);
printf("%d\n",b);
}
}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:2:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(a,b){
main.c:2:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~~~
main.c:2:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:32: error: 'EOF' undeclared (first use in this function)
2 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~
main.c:2:32: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:2:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
4 | printf("%d\n",b);
| ^~~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s143337692
|
p00002
|
C
|
a,b;
main(){
for(;scanf("%d%d",&a,&b)!= EOF;){
for(a+=b,b=0;a>0;a/=10,b++);
printf("%d\n",b);
}
}
|
main.c:1:1: warning: data definition has no type or storage class
1 | a,b;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | a,b;
| ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:3:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | a,b;
main.c:3:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~~~
main.c:3:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:32: error: 'EOF' undeclared (first use in this function)
3 | for(;scanf("%d%d",&a,&b)!= EOF;){
| ^~~
main.c:3:32: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | printf("%d\n",b);
| ^~~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s557946912
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int n;
scanf("%d", &n);
int a[n], b[n], R[n];
for(n=0; n<200; n++){
scanf("%d %d", &a[n], &b[n]);
R[n] = a[n]+b[n];
}
for(i=1; i<7; i=i*10){
if(R[n]>=10*(i-1) && R[n]<10*i)
printf("%d\n", i);
}
return 0;
}
|
main.c: In function 'main':
main.c:14:8: error: 'i' undeclared (first use in this function)
14 | for(i=1; i<7; i=i*10){
| ^
main.c:14:8: note: each undeclared identifier is reported only once for each function it appears in
|
s083914096
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int n;
scanf("%d", &n);
int a[n], b[n], R[n];
for(n=0; n<200; n++){
scanf("%d %d", &a[n], &b[n]);
R[n] = a[n]+b[n];
}
for(i=1; i<7; i=i*10){
if(R[n]>=10*(i-1) && R[n]<10*i){
printf("%d\n", i);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:14:8: error: 'i' undeclared (first use in this function)
14 | for(i=1; i<7; i=i*10){
| ^
main.c:14:8: note: each undeclared identifier is reported only once for each function it appears in
|
s002955450
|
p00002
|
C
|
#include <cstdio>
using namespace std;
int a,b,s;
int p,cnt,ans;
int scan(){
if(scanf("%d %d",&a,&b)==EOF) return 0;
return s=a+b;
}
int count(int s){
if(s/10==0) return cnt;
else {
cnt++;
count(s/10);
}
}
int main(){
while(1){
cnt=1;
ans=count(scan());
printf("%d\n",ans);
}
}
|
main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s636145616
|
p00002
|
C
|
#include <stdio.h>
using namespace std;
int a,b,s;
int p,cnt,ans;
int scan(){
if(scanf("%d %d",&a,&b)==EOF) return 0;
return s=a+b;
}
int count(int s){
if(s/10==0) return cnt;
else {
cnt++;
count(s/10);
}
}
int main(){
while(1){
cnt=1;
ans=count(scan());
printf("%d\n",ans);
}
}
|
main.c:2:1: error: unknown type name 'using'
2 | using namespace std;
| ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
2 | using namespace std;
| ^~~
|
s917615485
|
p00002
|
C
|
#include<stdio>
int main(){
int a,b,s,d,i;
while(scanf("%d %d",&a,&b)!=EOF){
s=a+b;
d=1;
while(s/10!=0){
d++;
s/=10;
}
printf("%d\n",d);
}
return 0;
}
|
main.c:1:9: fatal error: stdio: No such file or directory
1 | #include<stdio>
| ^~~~~~~
compilation terminated.
|
s004893147
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a, b, c, keta = 0;
while(scanf("%d%d", &a, &b)) != EOF){
c = a + b;
while(1){
c = c / 10;
keta++;
if(c == 0){
break;
}
}
printf("%d", keta);
}
}
|
main.c: In function 'main':
main.c:5:38: error: expected expression before '!=' token
5 | while(scanf("%d%d", &a, &b)) != EOF){
| ^~
main.c:5:44: error: expected statement before ')' token
5 | while(scanf("%d%d", &a, &b)) != EOF){
| ^
|
s708538226
|
p00002
|
C
|
#include<stdio.h>
typedef int S4;
typedef unsigned char U1;
#define FALSE (0)
#define TRUE (1)
#define MAX_DIGIT (7) /* ?????§?????° */
#define MIN_DIGIT (1) /* ????°??????° */
#define DIVID_NUM_FOR_LOWER_DIGIT (10) /* ????????????????????????????????° */
#define MAX_INPUT_VALUE (1000000) /* ?????§??\?????? */
S4 main(){
S4 s4_t_a;
S4 s4_t_b;
U1 u1_t_delimiter;
S4 s4_t_scanfRtn;
S4 s4_t_sumInput;
S4 s4_t_digit;
s4_t_scanfRtn = (S4)0;
while(s4_t_scanfRtn != (S4)EOF)
{
s4_t_scanfRtn = scanf("%d %d%c", &s4_t_a, &s4_t_b, &u1_t_delimiter);
s4_t_sumInput = s4_t_a + s4_t_b;
s4_t_digit = s4_s_calcDigit(s4_t_sumInput);
printf("%d\n", s4_t_digit);
}
return 0;
}
static S4 s4_s_calcDigit(S4 s4_a_inputNum)
{
S4 s4_t_digit;
S4 s4_t_maxNumOfDigit
U1 u1_t_isFinishCalc;
u1_t_isFinishCalc = (U1)FALSE;
s4_t_maxNumOfDigit = (S4)MAX_INPUT_VALUE;
s4_t_digit = (S4)MAX_DIGIT;
while((s4_t_digit > (S4)MIN_DIGIT) &&
(u1_t_isFinishCalc != (U1)TRUE))
{
if(s4_a_inputNum >= s4_t_maxNumOfDigit)
{
u1_t_isFinishCalc = (U1)TRUE;
}
else
{
s4_t_digit--;
s4_t_maxNumOfDigit /= (S4)DIVID_NUM_FOR_LOWER_DIGIT;
}
}
return (s4_t_digit);
}
|
main.c: In function 'main':
main.c:32:24: error: implicit declaration of function 's4_s_calcDigit' [-Wimplicit-function-declaration]
32 | s4_t_digit = s4_s_calcDigit(s4_t_sumInput);
| ^~~~~~~~~~~~~~
main.c: At top level:
main.c:40:11: error: static declaration of 's4_s_calcDigit' follows non-static declaration
40 | static S4 s4_s_calcDigit(S4 s4_a_inputNum)
| ^~~~~~~~~~~~~~
main.c:32:24: note: previous implicit declaration of 's4_s_calcDigit' with type 'int()'
32 | s4_t_digit = s4_s_calcDigit(s4_t_sumInput);
| ^~~~~~~~~~~~~~
main.c: In function 's4_s_calcDigit':
main.c:43:26: error: expected ';' before 'U1'
43 | S4 s4_t_maxNumOfDigit
| ^
| ;
44 | U1 u1_t_isFinishCalc;
| ~~
main.c:47:5: error: 's4_t_maxNumOfDigit' undeclared (first use in this function)
47 | s4_t_maxNumOfDigit = (S4)MAX_INPUT_VALUE;
| ^~~~~~~~~~~~~~~~~~
main.c:47:5: note: each undeclared identifier is reported only once for each function it appears in
|
s482840876
|
p00002
|
C
|
#include <stdio.h>
int main ()
{
int a,b, sum;
int count = 0;
scanf("%d %d", &a, &b);
sum = a + b;
for (int i = 1000000, i >= 10; i / 10) {
if (sum % i >= 0) {
count++;
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:13:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token
13 | for (int i = 1000000, i >= 10; i / 10) {
| ^~
main.c:13:46: error: expected ';' before ')' token
13 | for (int i = 1000000, i >= 10; i / 10) {
| ^
| ;
|
s797125716
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c,i=1,j=0;
while(scanf("%d %d",&a,&b)!=EOF){
while(!(1<=c&&c=<9)){
c=(a+b)/i;
i=i*10;
j++;
}
printf("%d\n",j);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:25: error: expected expression before '<' token
7 | while(!(1<=c&&c=<9)){
| ^
|
s894478222
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int i=0;
int tmp1, tmp2, tmp, count;
int list[200];
while(scanf("%d%d", &tmp1, &tmp2)!=EOF){
list[i++] = tmp1+tmp2;
}
for(int j=0; j<200; j++){
tmp=list[j];
count=0;
while(tmp<1) {
count++
tmp=tmp/10;
}
printf("%d", count);
}
return 0;
}
|
main.c: In function 'main':
main.c:14:20: error: expected ';' before 'tmp'
14 | count++
| ^
| ;
15 | tmp=tmp/10;
| ~~~
|
s446260041
|
p00002
|
C
|
#include <stdio.h>
int main(void){
while(1){
int a,b,x;
scanf("%d%d",&a,&b);
x=(a+b)/10;
print("%d",x);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
7 | print("%d",x);
| ^~~~~
| printf
|
s227634791
|
p00002
|
C
|
#include <stdio.h>
int main(void){
while(1){
int a,b,x;
scanf("%d%d",&a,&b);
x=(a+b)/10;
print("%d\n",x);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
7 | print("%d\n",x);
| ^~~~~
| printf
|
s580540407
|
p00002
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int a = 0, b = 0, c = 0;
char d[8];
scanf_s("%d%*[^\n]", &a);
getchar();
scanf_s("%d", &b);
c = a + b;
_itoa_s(c, d, 10);
printf("%d", strlen(d));
return 0;
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%d%*[^\n]", &a);
| ^~~~~~~
| scanf
main.c:13:9: error: implicit declaration of function '_itoa_s' [-Wimplicit-function-declaration]
13 | _itoa_s(c, d, 10);
| ^~~~~~~
|
s341696511
|
p00002
|
C
|
int main() {
int a,b,i;
int sum;
while(scanf("%d %d\n", &a,&b)!=EOF) {
sum=a+b;
for(i=0;sum!=0;i++){
sum=sum/10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | while(scanf("%d %d\n", &a,&b)!=EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main() {
main.c:5:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | while(scanf("%d %d\n", &a,&b)!=EOF) {
| ^~~~~
main.c:5:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:35: error: 'EOF' undeclared (first use in this function)
5 | while(scanf("%d %d\n", &a,&b)!=EOF) {
| ^~~
main.c:5:35: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:5:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:8: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
10 | printf("%d\n",i);
| ^~~~~~
main.c:10:8: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:8: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:8: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s203578424
|
p00002
|
C
|
#include<cstdio>
#include<cmath>
int main() {
int a, b;
while (scanf("%d %d", &a, &b)!=EOF) {
printf("%d\n",(int)log10(a+b) + 1);
}
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s936795432
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a, b, c, n;
while(scanf("%d %d", &a, &b) != EOF){
c=a+b;
n=0;
do{
n++;
c /= 10;
}
printf(" %d\n", n);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:9: error: expected 'while' before 'printf'
13 | printf(" %d\n", n);
| ^~~~~~
|
s996775601
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a[200],b[200],c[200],t,i,j;
for(i=0;scanf("%d %d",&a[i],&b[i])!=EOF;i++){
c[i] = a[i] + b[i];
}
for(j=0;j <= i;j++){
t = 1;
while(c[j] >= 10){
c[j] = c[j] / 10;
t++;
}
printf("%d\n",t);
}
getch();
return 0;
}
|
main.c: In function 'main':
main.c:15:9: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
15 | getch();
| ^~~~~
| getc
|
s865228935
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a,b,c;
int tem=0;
int ten;
while(true){
scanf("%d %d",&a,&b);
if(a==" "&&b==" ") break;
c = a+b;
for(ten=1;ten<=100000;ten*=10){
if(c/ten != 0){
tem+=1;
}else{
break;
}
}
printf("%d\n",tem);
tem=0;
}
return 0;
}
|
main.c: In function 'main':
main.c:7:11: error: 'true' undeclared (first use in this function)
7 | while(true){
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 | int main(void){
main.c:7:11: note: each undeclared identifier is reported only once for each function it appears in
7 | while(true){
| ^~~~
main.c:9:13: warning: comparison between pointer and integer
9 | if(a==" "&&b==" ") break;
| ^~
main.c:9:21: warning: comparison between pointer and integer
9 | if(a==" "&&b==" ") break;
| ^~
|
s630466735
|
p00002
|
C
|
#include<stdio.h>
#include<math.h>
int main(void)
{
int a,b;
int y;
scanf("%d%d",&a,&b);
y=a+b;
if(y<10){
printf("1桁\n");
}
if else(y<100){
printf("2桁\n");
}
if else(y<1000){
printf("3桁\n");
}
if else(y<10000){
printf("4桁\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:14:12: error: expected '(' before 'else'
14 | if else(y<100){
| ^~~~
| (
|
s135086754
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(void){
int a,b,sum,len;
char line[100],c[2];
fgets(line,sizeof(line),stdin);
sscanf(line,"%d %d",&a,&b);
sum = a + b;
itoa(sum,c,10);
sprintf(c,"%d",sum);
len = strlen(c);
printf("%d",len);
}
|
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
13 | itoa(sum,c,10);
| ^~~~
|
s754918504
|
p00002
|
C
|
#include <stdio.h>
main(){
while(1){
if(count==4) break;
int a,b,c,count,n;
n=0;
scanf("%d%d",&a,&b);
c=a+b;
count=0;
while(c>0){
c/=10;
count++;
}
printf("%d\n",count);
}
return 0;
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:8: error: 'count' undeclared (first use in this function)
4 | if(count==4) break;
| ^~~~~
main.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
|
s015523918
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c,n=0;
scanf("%d%d",&a,&b);
c=a+b;
do{c/10=c;
n++;
}while(c>=1);
printf("%d",n);
return 0;
}
|
main.c: In function 'main':
main.c:6:8: error: lvalue required as left operand of assignment
6 | do{c/10=c;
| ^
|
s954665009
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c;
double c;
while(scanf("%d%d",&a,&b)){
c=a+b;
n=0;
if(c==0)n=1;
else while(c>=1){
c/=10;
n++;}
printf("%d\n",n);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:8: error: conflicting types for 'c'; have 'double'
4 | double c;
| ^
main.c:3:9: note: previous declaration of 'c' with type 'int'
3 | int a,b,c;
| ^
main.c:7:1: error: 'n' undeclared (first use in this function)
7 | n=0;
| ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
|
s701062735
|
p00002
|
C
|
b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
|
main.c:1:1: warning: data definition has no type or storage class
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
main.c:1:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^~~~~
main.c:1:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:64: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^~~~~~
main.c:1:64: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:64: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:64: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:87: error: expected declaration specifiers or '...' before numeric constant
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^
main.c:1:90: error: expected identifier or '(' before '}' token
1 | b;main(a){for(;~scanf("%d%d",&a,&b);a+=b)for(b=0;a>0;b++)a/=10;printf("%d\n",b);}exit(0);}
| ^
|
s218266386
|
p00002
|
C
|
b;
main(a){
for(;~scanf("%d%d",&a,&b);a+=b)
{
for(b=0;a>0b++)
a/=10;
printf("%d\n",b);
}
exit(0);
}
|
main.c:1:1: warning: data definition has no type or storage class
1 | b;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(a){
| ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | for(;~scanf("%d%d",&a,&b);a+=b)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b;
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | for(;~scanf("%d%d",&a,&b);a+=b)
| ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:17: error: invalid suffix "b" on integer constant
5 | for(b=0;a>0b++)
| ^~
main.c:5:21: error: expected ';' before ')' token
5 | for(b=0;a>0b++)
| ^
| ;
main.c:7:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("%d\n",b);
| ^~~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
9 | exit(0);
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | b;
main.c:9:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
9 | exit(0);
| ^~~~
main.c:9:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s260614720
|
p00002
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, sum;
int i;
while (scanf("%d %d", &a, &b){
sum = a + b;
i = 0;
while (sum!= 0){
sum /= 10;
i++;
}
printf("%d\n", i);
}
return (0);
}
|
main.c: In function 'main':
main.c:8:38: error: expected ')' before '{' token
8 | while (scanf("%d %d", &a, &b){
| ~ ^
| )
main.c:21:1: error: expected expression before '}' token
21 | }
| ^
|
s002385153
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a, b, c;
int keta;
for(;"scanf("%d %d", &a, &b);){
c=a+b;
keta=1;
while((c/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:17: error: 'd' undeclared (first use in this function)
7 | for(;"scanf("%d %d", &a, &b);){
| ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:21: warning: missing terminating " character
7 | for(;"scanf("%d %d", &a, &b);){
| ^
main.c:7:21: error: missing terminating " character
7 | for(;"scanf("%d %d", &a, &b);){
| ^~~~~~~~~~~~~
main.c:7:21: error: expected ';' before 'c'
7 | for(;"scanf("%d %d", &a, &b);){
| ^
| ;
8 | c=a+b;
| ~
main.c:9:11: error: expected ')' before ';' token
9 | keta=1;
| ^
| )
main.c:7:6: note: to match this '('
7 | for(;"scanf("%d %d", &a, &b);){
| ^
main.c:12:3: error: expected expression before '}' token
12 | }
| ^
main.c: At top level:
main.c:14:3: error: expected identifier or '(' before 'return'
14 | return 0;
| ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
15 | }
| ^
|
s054190231
|
p00002
|
C
|
<stdio.h>
main(){
int a,b,i,sum;
while(scanf("%d",&a)!=EOF){
scanf("%d",&b);
sum=a+b;
for(i=1;sum>1;i++)
sum=sum/10;
printf("%d\n",i);
}
return(0);
}
|
main.c:1:1: error: expected identifier or '(' before '<' token
1 | <stdio.h>
| ^
|
s630818126
|
p00002
|
C
|
#include <stdio.h>
int main(void) {
int a,b,c,n;
c=0;
while(scanf("%d %d",&a,&b)!=EOF){
n=1;
printf("%d\n",);
n=n+1;
}
return 0;
}
|
main.c: In function 'main':
main.c:8:17: error: expected expression before ')' token
8 | printf("%d\n",);
| ^
|
s071079010
|
p00002
|
C
|
#include<stdio.h>
int checkdigit(int num)
{
int i=1;
while((num/=10)>0)
{
i++;
}
return i;
}
int power10(int power)
{
int i,temp=1;
for(i=0;i<power;i++)
{
temp*=10;
}
return temp;
}
int formatnum(char *str,int begin,int digit)
{
int i;
int temp=0;
for(i=begin;i<digit;i++)
{
temp+=((int)(*(str+i)-'0'))*power10(digit-i-1);
}
return temp;
}
int main()
{
char str[22];
int separate,end;
int num1,num2;
int i;
while(gets(str)!=NULL)
{
i=0;
while(*(str+i)!='\0')
{
if(*(str+i)==' '){separate=i;}
i++;
}
end=i;
num1=formatnum(str,0,separate);
num2=formatnum(str,separate+1,end);
printf("%d\n",checkdigit(num1+num2));
}
return 0;
}
|
main.c: In function 'main':
main.c:43:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
43 | while(gets(str)!=NULL)
| ^~~~
| fgets
main.c:43:24: warning: comparison between pointer and integer
43 | while(gets(str)!=NULL)
| ^~
|
s441751116
|
p00002
|
C
|
int main()
{
int a, b, ans;
char hoge[256];
while(scanf("%d%d", &a, &b) != EOF)
printf("%d\n", sprintf(hoge, "%d", a+b));
return 0;
}
|
main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | while(scanf("%d%d", &a, &b) != EOF)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main()
main.c:6:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | while(scanf("%d%d", &a, &b) != EOF)
| ^~~~~
main.c:6:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:40: error: 'EOF' undeclared (first use in this function)
6 | while(scanf("%d%d", &a, &b) != EOF)
| ^~~
main.c:6:40: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:40: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("%d\n", sprintf(hoge, "%d", a+b));
| ^~~~~~
main.c:7:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:32: error: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
7 | printf("%d\n", sprintf(hoge, "%d", a+b));
| ^~~~~~~
main.c:7:32: note: include '<stdio.h>' or provide a declaration of 'sprintf'
main.c:7:32: warning: incompatible implicit declaration of built-in function 'sprintf' [-Wbuiltin-declaration-mismatch]
main.c:7:32: note: include '<stdio.h>' or provide a declaration of 'sprintf'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.