結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー 👑 tatt61880tatt61880
提出日時 2019-03-14 01:13:50
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 680 bytes
コンパイル時間 2,919 ms
コンパイル使用メモリ 162,452 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-14 15:24:47
合計ジャッジ時間 3,509 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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