結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー dgd1724
提出日時 2019-04-02 18:49:48
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 56,868 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 13:58:41
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <fstream>
#include <iostream>
#include <string>


int main() {

	//std::ifstream inf("Text.txt");	std::cin.rdbuf(inf.rdbuf());

	int D;
	std::cin >> D;

	int  ans = 0;

	if (D < 10) {
		std::cout << D << std::endl;
	}
	else {
		ans = ((D - 10) / 2) + 10;

		if (D % 2 == 0) {
			std::cout << ans / 10 << std::endl;
		}
		else {
			std::cout << ans % 10 << std::endl;
		}
	}

	return 0;

}
0