結果

問題 No.1903 Day1
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2022-07-02 17:26:59
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 120 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 15,324 KB
最終ジャッジ日時 2023-08-18 08:41:58
合計ジャッジ時間 2,106 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,156 KB
testcase_01 AC 83 ms
15,128 KB
testcase_02 AC 82 ms
15,324 KB
testcase_03 AC 83 ms
15,264 KB
testcase_04 AC 82 ms
15,216 KB
testcase_05 AC 81 ms
15,308 KB
testcase_06 AC 82 ms
15,168 KB
testcase_07 AC 82 ms
15,096 KB
testcase_08 AC 80 ms
15,216 KB
testcase_09 AC 81 ms
15,124 KB
testcase_10 AC 81 ms
15,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
ans = 0
i = 0

while n > 0
	i += 1
	ans += 1

	if i == 7 then
		n += 6
		i = 0
	end
	n -= 1
end

puts ans
0