結果
問題 |
No.756 チャンパーノウン定数 (1)
|
ユーザー |
![]() |
提出日時 | 2019-02-14 21:01:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 624 ms |
コンパイル使用メモリ | 57,188 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 11:33:23 |
合計ジャッジ時間 | 1,279 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<iostream> #include<string> using namespace std; int main() { int D,x; cin >> D; if (D <= 9) { cout << D << endl; }else { x = D / 2 + 5; string y = to_string(x); if (D % 2 == 0) { cout << y[0] << endl; } else { cout << y[1] << endl; } } }