結果
問題 | No.756 チャンパーノウン定数 (1) |
ユーザー |
|
提出日時 | 2019-02-19 02:22:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 568 ms |
コンパイル使用メモリ | 68,368 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 09:21:20 |
合計ジャッジ時間 | 1,377 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; #define repX(a,b,c,x,...) x #define repN(a) repX a #define rep(...) repN((__VA_ARGS__,rep3,rep2,loop))(__VA_ARGS__) #define rep2(i,n) rep3(i,0,n) #define rep3(i,begin,end) for(int i=(int)(begin),i##_end=(int)(end);i<i##_end;++i) int main(){ int D; cin >> D; char s[1000] = "."; rep(i, 1, 100){ char buff[1000]; strcpy(buff, s); sprintf(s, "%s%d", buff, i); } cout << s[D] << endl; return 0; }