結果

問題 No.746 7の倍数
ユーザー simansiman
提出日時 2020-11-12 09:04:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 741 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 117,524 KB
最終ジャッジ日時 2023-09-30 01:05:52
合計ジャッジ時間 9,467 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,252 KB
testcase_01 AC 76 ms
15,140 KB
testcase_02 AC 77 ms
15,276 KB
testcase_03 AC 741 ms
117,224 KB
testcase_04 AC 84 ms
20,308 KB
testcase_05 AC 118 ms
55,460 KB
testcase_06 AC 275 ms
117,492 KB
testcase_07 AC 217 ms
117,244 KB
testcase_08 AC 293 ms
117,300 KB
testcase_09 AC 216 ms
117,372 KB
testcase_10 AC 109 ms
47,456 KB
testcase_11 AC 482 ms
116,796 KB
testcase_12 AC 718 ms
117,196 KB
testcase_13 AC 375 ms
117,468 KB
testcase_14 AC 442 ms
117,520 KB
testcase_15 AC 414 ms
117,300 KB
testcase_16 AC 434 ms
117,524 KB
testcase_17 AC 389 ms
117,332 KB
testcase_18 AC 439 ms
117,480 KB
testcase_19 AC 394 ms
117,260 KB
testcase_20 AC 216 ms
117,512 KB
testcase_21 AC 143 ms
73,008 KB
testcase_22 AC 527 ms
117,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i

if N == 0
  puts 0
  exit
end

str = '142857'
ans = '0.'
idx = 0

N.times do
  ans += str[idx % 6]
  idx += 1
end

puts ans
0