結果

問題 No.671 1000000007
コンテスト
ユーザー odenmonster
提出日時 2018-06-04 11:56:22
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 527 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 165 ms
コンパイル使用メモリ 37,572 KB
最終ジャッジ日時 2026-02-22 01:10:31
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

//10で何回割れるか
int zyu(unsigned long int x) {
	int counter;
	unsigned long int s = x - 7;				//10のホニャ乗の値
	unsigned long int t = 10;

	while(s % 10 == 0) {
		s = s / t;
		counter++;
	}
	return (counter);
}
//緊急関数
int wa(unsigned long int a,unsigned long int b){
	return (zyu(a) + zyu(b));
}

int main(void){
	unsigned long int a, b;
	int num;
	b = 1000000007;
	scanf("%lu", &a);
	num = (wa(a, b) - 123 ) / 2;
	num >= 0 ? printf("%d\n",num) : printf("%d\n",-num);
	return 0;
}
0