結果

問題 No.1903 Day1
ユーザー maguroflymagurofly
提出日時 2022-04-15 21:50:03
言語 Ruby
(3.2.2)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 189 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 11,496 KB
実行使用メモリ 15,324 KB
最終ジャッジ日時 2023-08-26 07:48:19
合計ジャッジ時間 2,437 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

N = gets.to_i
problems = N

(1 ..).each do |day|
    if day % 7 == 0
        problems += 6
    end
    
    problems -= 1
    
    if problems == 0
        puts day
        exit
    end
end
0