結果

問題 No.1992 Tendon Walk
ユーザー VvyLw
提出日時 2025-04-04 10:18:08
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 1,347 ms
コンパイル使用メモリ 158,208 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-04-04 10:18:11
合計ジャッジ時間 1,659 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;
import core.bitop;
import core.checkedint;
import core.time;

void main() {
	const x = readln.chomp.to!int;
	int a = 0, b = 0, c = 0;
	while(a != x) {
		if(c <= 1 || c == 4) {
			a += 2;
			b += 2;
		} else {
			a--;
			b++;
		}
		c++;
		c %= 7;
		// writeln(a);
	}
	writeln(b);
}
0