結果
問題 |
No.1942 Leading zero
|
ユーザー |
![]() |
提出日時 | 2023-06-29 11:51:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 1,793 ms |
コンパイル使用メモリ | 193,836 KB |
最終ジャッジ日時 | 2025-02-15 03:02:45 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve(){ bool f=0; string S; cin >> S; if (S == "00000"){ cout << 0 << endl; return; } for (int i=0; i<5; i++){ if (S[i] != '0') f=1; if (f) cout << S[i]; } cout << endl; } int main(){ int N; cin >> N; while(N){ N--; solve(); } return 0; }