結果

問題 No.671 1000000007
ユーザー odenmonsterodenmonster
提出日時 2018-06-04 11:56:22
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 28,320 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-12 22:04:56
合計ジャッジ時間 1,100 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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