結果

問題 No.381 名声値を稼ごう Extra
コンテスト
ユーザー testestest
提出日時 2016-06-18 22:50:55
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
TLE  
実行時間 -
コード長 299 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 147 ms
コンパイル使用メモリ 29,992 KB
最終ジャッジ日時 2026-02-23 21:37:28
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 TLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
    2 | a[140000];
      | ^
main.c:3:1: warning: data definition has no type or storage class
    3 | m,s;
      | ^
main.c: In function ‘main’:
main.c:21:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
   21 |         printf("%d",m);
      |         ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
  +++ |+#include <stdio.h>
    1 | char p[1000010];

ソースコード

diff #
raw source code

char p[1000010];
a[140000];
m,s;

ad(char i){
	int x;
	if(i<11)return 0;
	++s;
	a[0]=a[0]*10+i-48;
	for(x=1;x<=s>>3;x++){
		a[x]*=10;
		a[x]+=a[x-1]>>25;
		a[x-1]&=0x1FFFFFF;
	}
	return 1;
}

main(){
	for(;ad(getchar()););
	for(s=s/8+1;s--;)m+=__builtin_popcount(a[s]);
	printf("%d",m);
	return 0;
}
0