結果
問題 | No.375 立方体のN等分 (1) |
ユーザー | 👑 testestest |
提出日時 | 2016-06-04 22:29:42 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 231 bytes |
コンパイル時間 | 306 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 08:29:00 |
合計ジャッジ時間 | 1,493 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | WA | - |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | WA | - |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | WA | - |
testcase_11 | AC | 1 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | AC | 4 ms
5,248 KB |
testcase_15 | AC | 1 ms
5,248 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 4 ms
5,248 KB |
testcase_19 | AC | 1 ms
5,248 KB |
testcase_20 | WA | - |
testcase_21 | AC | 0 ms
5,248 KB |
testcase_22 | AC | 11 ms
5,248 KB |
testcase_23 | AC | 1 ms
5,248 KB |
testcase_24 | AC | 1 ms
5,248 KB |
testcase_25 | AC | 1 ms
5,248 KB |
testcase_26 | WA | - |
testcase_27 | AC | 1 ms
5,248 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 1 ms
5,248 KB |
testcase_31 | AC | 1 ms
5,248 KB |
testcase_32 | AC | 1 ms
5,248 KB |
testcase_33 | WA | - |
コンパイルメッセージ
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 ‘pow’ [-Wimplicit-function-declaration] 8 | i=pow(m,1/3.)+2; | ^~~ main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘pow’ +++ |+#include <math.h> 1 | long m,n,s, main.c:8:3: warning: incompatible implicit declaration of built-in function ‘pow’ [-Wbuiltin-declaration-mismatch] 8 | i=pow(m,1/3.)+2; | ^~~ main.c:8:3: note: include ‘<math.h>’ or provide a declaration of ‘pow’ 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=pow(m,1/3.)+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); }