結果

問題 No.2051 Divide
ユーザー first_vilfirst_vil
提出日時 2022-09-21 17:22:06
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 5,304 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-23 20:05:04
合計ジャッジ時間 3,214 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 23 ms
4,376 KB
testcase_03 AC 12 ms
4,376 KB
testcase_04 AC 8 ms
4,376 KB
testcase_05 AC 54 ms
4,380 KB
testcase_06 AC 93 ms
4,380 KB
testcase_07 AC 80 ms
4,376 KB
testcase_08 AC 62 ms
4,376 KB
testcase_09 AC 35 ms
4,376 KB
testcase_10 AC 16 ms
4,376 KB
testcase_11 AC 32 ms
4,376 KB
testcase_12 AC 136 ms
4,376 KB
testcase_13 AC 39 ms
4,380 KB
testcase_14 AC 77 ms
4,380 KB
testcase_15 AC 134 ms
4,376 KB
testcase_16 AC 13 ms
4,376 KB
testcase_17 AC 124 ms
4,380 KB
testcase_18 AC 81 ms
4,380 KB
testcase_19 AC 61 ms
4,376 KB
testcase_20 AC 38 ms
4,380 KB
testcase_21 AC 13 ms
4,376 KB
testcase_22 AC 64 ms
4,376 KB
testcase_23 AC 137 ms
4,376 KB
testcase_24 AC 128 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read a b
c=0
for ((i=1; i*i <= a; i++)) ; do
	if ((a%i==0)); then
		if ((i%b==0)); then
			c=$((c+1))
		fi
		if ((i*i!=a && a/i%b==0)); then
			c=$((c+1))
		fi
	fi
done
echo $c
0