Language: C

egin: 2020-08-13 22:00 UTC+7
 S4: Competitive Programming 101
End: 2020-08-14 19:00 UTC+7
04:55:21
Elapsed: 04:55:21RunningRemaining: 16:04:38
Overview
Problem
Status
Rank (04:55:16)
0 Comments
Previous12345…Next
Username
Prob
	Result
	Time
(ms)	Mem
(MB)	Lang
	Submit Time
hans0221
F
Wrong Answer
C
9 min ago
hans0221
F
Wrong Answer
C
15 min ago
hans0221
F
Wrong Answer
C
20 min ago
hans0221
F
Compilation Error
C
20 min ago
hans0221
F
Wrong Answer
C
29 min ago
hans0221
F
Wrong Answer
C
34 min ago
hans0221
F
Wrong Answer
C
35 min ago
hans0221
F
Wrong Answer
C
36 min ago
hans0221
F
Wrong Answer
C
37 min ago
hans0221
F
Wrong Answer
C
42 min ago
hans0221
F
Wrong Answer
C
46 min ago
hans0221
F
Wrong Answer
C
1 hr ago
hans0221
F
Wrong Answer
C
1 hr ago
hans0221
F
Wrong Answer
C
1 hr ago
hans0221
F
Wrong Answer
C
2 hr ago
hans0221
F
Wrong Answer
C
2 hr ago
hans0221
F
Wrong Answer
C
2 hr ago
hans0221
F
Wrong Answer
C
2 hr ago
hans0221
F
Wrong Answer
C
2 hr ago
hans0221
F
Wrong Answer
C
3 hr ago
     
All Copyright Reserved © 2010-2020 Xu Han
Server Time: 2020-08-14 02:55:20 UTC+7

#26819165 | hans0221's solution for [Problem F]
Status
Wrong Answer
Length
755
Lang
C (Clang 10.0.0)
Submitted
2020-08-14 02:25:12
Shared

24.0 / 25.0
Select Code
#include<stdio.h>
int main()	
{
	long long tc;
	scanf("%lld",&tc);
	long long input[tc+1];
	long long total = 1;
	int flag = 1;
	int flag2 = 0;
	long long sementara;
	int countO = 0,countzero = 0;
	for(int i = 0;i<tc;i++)
	{
		scanf("%lld",&input[i]);
		total *= input[i];
		sementara = input[i];
		while(sementara != 0)
		{
			if(sementara % 10 == 0) countO++;
			if(sementara > 9) countzero++;
			sementara /= 10;
		}
		if(total >1000000000000000000 || total < 0)
		{
		 	flag = 0;
		}
		if(countO > 18 || countzero >= 18)
		{
			flag = 0;
		}
		if(input[i] == 0)
		{
			flag2 = 1;
		}
	}
	if(flag2 == 1) printf("0\n");
	else if(flag == 0) printf("-1\n");
	else if(total > 1000000000000000000 || total < 0) printf("-1\n");
	else printf("%lld\n",total);
	return 0;
}	

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | egin: 2020-08-13 22:00 UTC+7
      |     ^
main.c:1:12: error: invalid digit "8" in octal constant
    1 | egin: 2020-08-13 22:00 UTC+7
      |            ^~
main.c:3:11: error: invalid digit "8" in octal constant
    3 | End: 2020-08-14 19:00 UTC+7
      |           ^~
main.c:5:16: error: invalid suffix "RunningRemaining" on integer constant
    5 | Elapsed: 04:55:21RunningRemaining: 16:04:38
      |                ^~~~~~~~~~~~~~~~~~
main.c:11:14: error: stray '\342' in program
   11 | Previous12345<U+2026>Next
      |              ^~~~~~~~
main.c:120:24: error: stray '\302' in program
  120 | All Copyright Reserved <U+00A9> 2010-2020 Xu Han
      |                        ^~~~~~~~
main.c:121:19: error: invalid digit "8" in octal constant
  121 | Server Time: 2020-08-14 02:55:20 UTC+7
      |                   ^~
main.c:123:11: error: "|" is not a valid filename
  123 | #26819165 | hans0221's solution for [Problem F]
      |           ^
main.c:123:21: warning: missing terminating ' character
  123 | #26819165 | hans0221's solution for [Problem F]
      |                     ^
main.c:129:10: error: too many decimal points in number
  129 | C (Clang 10.0.0)
      |          ^~~~~~
main.c:131:6: error: invalid digit "8" in octal constant
  131 | 2020-08-14 02:25:12
      |      ^~
In file included from /usr/include/stdio.h:47,
                 from main.c:136:
/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>'