ショートコーディング

Submission #567130

Source codeソースコード

n;f(x,i){n=++i>x?:fmax(f(x%i?0:x/i,1)+x/10+x%10,f(x,i));}main(){n=scanf("%d",&n)/printf("%d\n",99/n?f(n,1):19);}

Submission

Task問題 C - 割り算と足し算
User nameユーザ名 eha
Created time投稿日時
Language言語 C (GCC 4.9.2)
Status状態 AC
Score得点 100
Source lengthソースコード長 112 Byte
File nameファイル名
Exec time実行時間 30 ms
Memory usageメモリ使用量 804 KB

Compiler messageコンパイルメッセージ

./Main.c:1:1: warning: data definition has no type or storage class
n;f(x,i){n=++i>x?:fmax(f(x%i?0:x/i,1)+x/10+x%10,f(x,i));}main(){n=scanf("%d",&n)/printf("%d\n",99/n?f(n,1):19);}
^
./Main.c: In function ‘f’:
./Main.c:1:19: warning: incompatible implicit declaration of built-in function ‘fmax’
n;f(x,i){n=++i>x?:fmax(f(x%i?0:x/i,1)+x/10+x%10,f(x,i));}main(){n=scanf("%d",&n)/printf("%d\n",99/n?f(n,1):19);}
^
./Main.c: In function ‘main’:
./Main.c:1:67: warning: incompatible implicit declaration of built-in function ‘scanf’
n;f(x,i){n=++i>x?:fmax(f(x%i?0:x/i,1)+x/10+x%10,f(x,i));}main(){n=scanf("%d",&n)/printf("%d\n",99/n?f(n,1):19);}
^
./Main.c:1:82: warning: incompatible implicit declaration of built-in function ‘printf’
n;f(x,i){n=++i>x?:fmax(f(x%i?0:x/i,1)+x/10+x%10,f(x,i));}main(){n=scanf("%d",&n)/printf("%d\n",99/n?f(n,1):19);}
...

Test case

Set

Set name Score得点 / Max score Cases
Sample - 12,1,100
All 100 / 100 1,10,100,11,12,13,14,15,16,17,18,19,2,20,21,22,23,24,25,26,27,28,29,3,30,31,32,33,34,35,36,37,38,39,4,40,41,42,43,44,45,46,47,48,49,5,50,51,52,53,54,55,56,57,58,59,6,60,61,62,63,64,65,66,67,68,69,7,70,71,72,73,74,75,76,77,78,79,8,80,81,82,83,84,85,86,87,88,89,9,90,91,92,93,94,95,96,97,98,99

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
1 AC 22 ms 700 KB
10 AC 23 ms 672 KB
100 AC 23 ms 664 KB
11 AC 22 ms 800 KB
12 AC 23 ms 696 KB
13 AC 22 ms 684 KB
14 AC 22 ms 796 KB
15 AC 25 ms 792 KB
16 AC 25 ms 792 KB
17 AC 25 ms 668 KB
18 AC 23 ms 792 KB
19 AC 25 ms 792 KB
2 AC 26 ms 788 KB
20 AC 23 ms 796 KB
21 AC 24 ms 792 KB
22 AC 24 ms 796 KB
23 AC 24 ms 796 KB
24 AC 25 ms 692 KB
25 AC 24 ms 796 KB
26 AC 24 ms 700 KB
27 AC 24 ms 800 KB
28 AC 24 ms 696 KB
29 AC 22 ms 800 KB
3 AC 22 ms 688 KB
30 AC 22 ms 692 KB
31 AC 22 ms 792 KB
32 AC 24 ms 800 KB
33 AC 24 ms 796 KB
34 AC 24 ms 728 KB
35 AC 24 ms 796 KB
36 AC 24 ms 804 KB
37 AC 24 ms 692 KB
38 AC 24 ms 796 KB
39 AC 24 ms 696 KB
4 AC 24 ms 800 KB
40 AC 25 ms 672 KB
41 AC 24 ms 792 KB
42 AC 24 ms 796 KB
43 AC 24 ms 796 KB
44 AC 23 ms 788 KB
45 AC 24 ms 796 KB
46 AC 24 ms 792 KB
47 AC 25 ms 748 KB
48 AC 25 ms 788 KB
49 AC 23 ms 644 KB
5 AC 23 ms 644 KB
50 AC 24 ms 792 KB
51 AC 24 ms 788 KB
52 AC 24 ms 792 KB
53 AC 30 ms 800 KB
54 AC 24 ms 696 KB
55 AC 24 ms 716 KB
56 AC 21 ms 796 KB
57 AC 23 ms 788 KB
58 AC 23 ms 800 KB
59 AC 24 ms 796 KB
6 AC 24 ms 700 KB
60 AC 24 ms 800 KB
61 AC 24 ms 796 KB
62 AC 23 ms 792 KB
63 AC 24 ms 792 KB
64 AC 22 ms 700 KB
65 AC 23 ms 724 KB
66 AC 22 ms 800 KB
67 AC 23 ms 724 KB
68 AC 22 ms 792 KB
69 AC 23 ms 644 KB
7 AC 24 ms 724 KB
70 AC 22 ms 796 KB
71 AC 24 ms 788 KB
72 AC 24 ms 800 KB
73 AC 24 ms 644 KB
74 AC 25 ms 800 KB
75 AC 23 ms 780 KB
76 AC 25 ms 796 KB
77 AC 25 ms 672 KB
78 AC 25 ms 704 KB
79 AC 25 ms 796 KB
8 AC 25 ms 800 KB
80 AC 24 ms 788 KB
81 AC 24 ms 728 KB
82 AC 23 ms 796 KB
83 AC 23 ms 736 KB
84 AC 23 ms 728 KB
85 AC 22 ms 696 KB
86 AC 23 ms 644 KB
87 AC 23 ms 788 KB
88 AC 23 ms 728 KB
89 AC 24 ms 640 KB
9 AC 23 ms 784 KB
90 AC 22 ms 688 KB
91 AC 22 ms 788 KB
92 AC 23 ms 724 KB
93 AC 21 ms 792 KB
94 AC 23 ms 720 KB
95 AC 23 ms 728 KB
96 AC 23 ms 728 KB
97 AC 24 ms 700 KB
98 AC 23 ms 792 KB
99 AC 22 ms 788 KB