結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー cielciel
提出日時 2020-02-09 00:47:15
言語 Ruby
(3.3.0)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 455 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 11,480 KB
実行使用メモリ 21,456 KB
最終ジャッジ日時 2023-09-29 22:50:34
合計ジャッジ時間 7,242 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
21,252 KB
testcase_01 AC 159 ms
21,256 KB
testcase_02 AC 148 ms
21,248 KB
testcase_03 AC 142 ms
21,372 KB
testcase_04 AC 150 ms
21,428 KB
testcase_05 AC 145 ms
21,456 KB
testcase_06 AC 142 ms
21,360 KB
testcase_07 AC 140 ms
21,348 KB
testcase_08 AC 144 ms
21,268 KB
testcase_09 AC 146 ms
21,344 KB
testcase_10 AC 143 ms
21,380 KB
testcase_11 AC 144 ms
21,300 KB
testcase_12 AC 142 ms
21,236 KB
testcase_13 AC 143 ms
21,364 KB
testcase_14 AC 140 ms
21,244 KB
testcase_15 AC 139 ms
21,400 KB
testcase_16 AC 143 ms
21,428 KB
testcase_17 AC 142 ms
21,432 KB
testcase_18 AC 142 ms
21,200 KB
testcase_19 AC 143 ms
21,428 KB
testcase_20 AC 145 ms
21,248 KB
testcase_21 AC 139 ms
21,400 KB
testcase_22 AC 139 ms
21,280 KB
testcase_23 AC 140 ms
21,240 KB
testcase_24 AC 140 ms
21,304 KB
testcase_25 AC 141 ms
21,300 KB
testcase_26 AC 140 ms
21,336 KB
testcase_27 AC 141 ms
21,404 KB
testcase_28 AC 141 ms
21,424 KB
testcase_29 AC 141 ms
21,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
IO.popen('gcc -xc -o/tmp/zzz - -lquadmath','w'){|io|
	io.puts DATA.read
}
IO.popen('/tmp/zzz','r+'){|io|
	io.write $<.read
	io.close_write
	puts io.read
}
File.unlink('/tmp/zzz')

__END__
#include <stdio.h>
#include <quadmath.h>
char buf[99];
int main(){
	int N,i=0;
	scanf("%d",&N);
	__float128 s=0;
	for(;i<N;i++){
		scanf("%s",buf);
		s+=strtoflt128(buf,NULL);
	}
	quadmath_snprintf(buf,sizeof(buf),"%.10Qf",s);
	puts(buf);
	return 0;
}
0