結果
問題 | No.376 立方体のN等分 (2) |
ユーザー | 👑 testestest |
提出日時 | 2016-06-04 22:32:03 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 227 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 21,632 KB |
実行使用メモリ | 8,356 KB |
最終ジャッジ日時 | 2024-10-08 08:35:34 |
合計ジャッジ時間 | 9,628 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,820 KB |
testcase_02 | AC | 404 ms
6,820 KB |
testcase_03 | AC | 2,209 ms
6,816 KB |
testcase_04 | AC | 125 ms
6,820 KB |
testcase_05 | AC | 1 ms
6,820 KB |
testcase_06 | AC | 1 ms
6,820 KB |
testcase_07 | AC | 0 ms
6,820 KB |
testcase_08 | AC | 5 ms
6,816 KB |
testcase_09 | AC | 48 ms
6,816 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
コンパイルメッセージ
main.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 5 | main(){ | ^~~~ main.c: In function ‘main’: main.c:6:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 6 | scanf("%ld",&m); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | long m,n,s, main.c:6:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 6 | scanf("%ld",&m); | ^~~~~ main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:8:3: warning: implicit declaration of function ‘sqrt’ [-Wimplicit-function-declaration] 8 | i=sqrt(m)+2; | ^~~~ main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘sqrt’ +++ |+#include <math.h> 1 | long m,n,s, main.c:8:3: warning: incompatible implicit declaration of built-in function ‘sqrt’ [-Wbuiltin-declaration-mismatch] 8 | i=sqrt(m)+2; | ^~~~ main.c:8:3: note: include ‘<math.h>’ or provide a declaration of ‘sqrt’ main.c:17:4: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 17 | s=!printf("%ld %ld",s,m-1); | ^~~~~~ main.c:17:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:17:4: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:17:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
long m,n,s, a,b,c, i,j,k; #define min(p,q)(p<q?p:q) main(){ scanf("%ld",&m); s=m; i=sqrt(m)+2; for(;--i>0;){ if(m%i!=0)continue; n=m/i; for(j=i;j>0;j--){ if(n%j!=0)continue; s=min(s,i+j+n/j-3); } } s=!printf("%ld %ld",s,m-1); }