結果

問題 No.1161 Many Powers
ユーザー 👑 tatt61880tatt61880
提出日時 2021-02-18 21:05:50
言語 Kuin
(KuinC++ v.2021.9.17)
結果
TLE  
実行時間 -
コード長 384 bytes
コンパイル時間 2,201 ms
コンパイル使用メモリ 149,540 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-14 17:14:21
合計ジャッジ時間 21,459 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 7 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 69 ms
4,348 KB
testcase_06 AC 71 ms
4,352 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 856 ms
4,348 KB
testcase_09 AC 1,083 ms
4,348 KB
testcase_10 AC 388 ms
4,348 KB
testcase_11 AC 750 ms
4,348 KB
testcase_12 AC 338 ms
4,352 KB
testcase_13 AC 1,291 ms
4,352 KB
testcase_14 TLE -
testcase_15 AC 1,704 ms
4,352 KB
testcase_16 AC 1,992 ms
4,352 KB
testcase_17 AC 1,389 ms
4,352 KB
testcase_18 AC 1,085 ms
4,348 KB
testcase_19 AC 601 ms
4,348 KB
testcase_20 TLE -
testcase_21 AC 418 ms
4,348 KB
testcase_22 AC 1,446 ms
4,352 KB
testcase_23 AC 2 ms
4,352 KB
testcase_24 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var a: int :: cui@inputInt()
	var b: int :: cui@inputInt()
	var c: int :: cui@inputInt()
	
	var d: int :: a % c
	var n: int :: a / c
	
	var ans: int :: 0
	if(n <> 0)
		for i(0, c - 1)
			do ans :+ math@modPow(i, b, c)
			do ans :% c
		end for
		do ans :* n
	end if
	for i(0, d)
		do ans :+ math@modPow(i, b, c)
		do ans :% c
	end for
	
	do cui@print("\{ans}\n")
end func
0