結果

問題 No.1903 Day1
ユーザー eagleeagle
提出日時 2022-05-28 13:37:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,000 ms
コード長 463 bytes
コンパイル時間 2,444 ms
コンパイル使用メモリ 73,988 KB
実行使用メモリ 57,664 KB
最終ジャッジ日時 2023-10-20 23:03:55
合計ジャッジ時間 4,482 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
57,452 KB
testcase_01 AC 137 ms
57,356 KB
testcase_02 AC 136 ms
57,404 KB
testcase_03 AC 141 ms
57,148 KB
testcase_04 AC 137 ms
57,432 KB
testcase_05 AC 135 ms
57,420 KB
testcase_06 AC 137 ms
57,524 KB
testcase_07 AC 138 ms
57,436 KB
testcase_08 AC 139 ms
57,664 KB
testcase_09 AC 139 ms
57,604 KB
testcase_10 AC 140 ms
57,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int day = 0;
		int Q = N;
		while(Q > 0) {
			//日数をカウント
			day++;
			//7の倍数の日に
			if(day % 7 == 0) {
				//問題が6問ずつ追加される
				Q += 6;				
			}
			//正午に1問解く
			Q--;
		}
		System.out.println(day);
	}
}
0