結果

問題 No.491 10^9+1と回文
ユーザー 👑 testestest
提出日時 2017-03-12 00:59:09
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 180 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 29,952 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 14:14:04
合計ジャッジ時間 2,442 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 102 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2*9)*pow(10,m/2)-2+(f(n)<=n));}
      | ^
main.c: In function 'f':
main.c:1:1: warning: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: warning: type of 't' defaults to 'int' [-Wimplicit-int]
main.c:1:21: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    1 | f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2*9)*pow(10,m/2)-2+(f(n)<=n));}
      |                     ^~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'pow'
  +++ |+#include <math.h>
    1 | f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2*9)*pow(10,m/2)-2+(f(n)<=n));}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    1 | f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2*9)*pow(10,m/2)-2+(f(n)<=n));}
      |                     ^~~
main.c:1:21: note: include '<math.h>' or provide a declaration of 'pow'
main.c:1:30: warning: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
    1 | f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2*9)*pow(10,m/2)-2+(f(n)<=n));}
      |                              ^~~~~
main.c:1:30: note: include '<math.h>' or provide a declaration of 'log10'
main.c:1:30: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
main.c:1:30: note: include '<math.h>' or

ソースコード

diff #
プレゼンテーションモードにする

f(n,t){return n>9?t=pow(10,t=log10(n)),f(n%t/10)*10-n/t*~t:n;}long n,x=1+1e9;main(m){scanf("%ld",&n);m=log10(n/=x);printf("%d",n=n/pow(10,-~m/2)-~(m%2
    *9)*pow(10,m/2)-2+(f(n)<=n));}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0