結果
問題 |
No.964 2020
|
ユーザー |
|
提出日時 | 2020-01-13 20:22:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 2,285 ms |
コンパイル使用メモリ | 195,132 KB |
最終ジャッジ日時 | 2025-01-08 17:26:32 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘void solve()’: main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d", &n); | ~~~~~^~~~~~~~~~
ソースコード
#include <bits/stdc++.h> using i64 = int_fast64_t; #define repeat(i, a, b) for(int i = (a); (i) < (b); ++(i)) #define rep(i, n) repeat(i, 0, n) void solve() { int n; scanf("%d", &n); std::string s; for(int i = n - 1; i >= 0; i--) { rep(_, n) s += std::to_string(i); } std::cout << s << std::endl; } int main() { // std::ios::sync_with_stdio(false); std::cin.tie(nullptr); solve(); return 0; }