結果
問題 | No.2246 1333-like Number |
ユーザー |
|
提出日時 | 2023-03-17 21:51:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 414 bytes |
コンパイル時間 | 590 ms |
コンパイル使用メモリ | 66,436 KB |
最終ジャッジ日時 | 2025-02-11 12:56:37 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>using namespace std;int main(){int n;cin >> n;int t = (n - 1) / 36;int r = (n - 1) % 36 + 1;for (int i = 1; i < 9; i++){if (r + i <= 9){cout << i;for (int j = 0; j <= t; j++){cout << i + r;}cout << endl;break;}r -= 9 - i;}}