Submission #19744422


Source Code Expand

#include <stdio.h>

main(){
        int n,a;
        scanf("%d",&n);
        char o[10];
        int c=9;

        o[9]=0;

        if(!n)
                printf("%d",n);


        while(n){
                a=n%36;
                o[--c]=a+(a<10 ? '0': ('A'-10));
                n/=36;
        }
        puts(&o[c]);
        return 0;
}

Submission Info

Submission Time
Task C - Hexatridecimal
User zizou
Language C (GCC 9.2.1)
Score 8
Code Size 358 Byte
Status AC
Exec Time 3 ms
Memory 1680 KiB

Compile Error

./Main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    3 | main(){
      | ^~~~
./Main.c: In function ‘main’:
./Main.c:5:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    5 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 8 / 8
Status
AC × 3
AC × 24
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 3 ms 1660 KiB
hand_02.txt AC 3 ms 1512 KiB
hand_03.txt AC 2 ms 1592 KiB
random_01.txt AC 1 ms 1508 KiB
random_02.txt AC 2 ms 1612 KiB
random_03.txt AC 1 ms 1512 KiB
random_04.txt AC 1 ms 1596 KiB
random_05.txt AC 1 ms 1588 KiB
random_06.txt AC 1 ms 1616 KiB
random_07.txt AC 1 ms 1588 KiB
random_08.txt AC 1 ms 1592 KiB
random_09.txt AC 1 ms 1608 KiB
random_10.txt AC 2 ms 1504 KiB
random_11.txt AC 1 ms 1660 KiB
random_12.txt AC 1 ms 1624 KiB
random_13.txt AC 2 ms 1600 KiB
random_14.txt AC 1 ms 1648 KiB
random_15.txt AC 1 ms 1584 KiB
random_16.txt AC 2 ms 1664 KiB
random_17.txt AC 1 ms 1612 KiB
random_18.txt AC 1 ms 1640 KiB
sample_01.txt AC 1 ms 1608 KiB
sample_02.txt AC 1 ms 1568 KiB
sample_03.txt AC 2 ms 1680 KiB