結果
| 問題 | No.756 チャンパーノウン定数 (1) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-12-17 20:21:01 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 328 bytes | 
| コンパイル時間 | 1,585 ms | 
| コンパイル使用メモリ | 166,744 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-25 07:37:29 | 
| 合計ジャッジ時間 | 2,476 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n; cin >> n;
    if (n < 10) {
        cout << n << endl;
    } else {
        n -= 9;
        int s = (n+1) / 2 + 9;
        if (n % 2 == 0) {
            cout << s%10 << endl;
        } else {
            cout << s/10 << endl;
        }
    }
    return 0;
}
            
            
            
        