結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-25 15:40:42
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 658 bytes
コンパイル時間 2,952 ms
コンパイル使用メモリ 163,300 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-29 22:53:00
合計ジャッジ時間 4,257 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,384 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 3 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var a: int
	var b: int
	for(1, n)
		var strs: [][]char :: cui@input().split(".")
		var isNegative: bool :: strs[0][0] = '-'
		do a :+ strs[0].toInt(&)
		if(^strs = 2)
			for i(0, ^strs[1] - 1)
				do b :+ (isNegative ?(-1, 1)) * (strs[1][i] $ int - '0' $ int) * 10 ^ (9 - i)
			end for
		end if
	end for
	if(b < 0)
		do a :- -b / 10 ^ 10 + 1
		do b :+ (-b / 10 ^ 10 + 1) * 10 ^ 10
	end if
	if(b >= 10 ^ 10)
		do a :+ b / 10 ^ 10
		do b :% 10 ^ 10
	end if
	if(a < 0)
		do cui@print("-")
		if(b <> 0)
			do a :+ 1
			do b :- 10 ^ 10
		end if
	end if
	do cui@print("\{a.abs()}.\{b.abs().toStrFmt("010d")}\n")
end func
0