提出 #2758333
ソースコード 拡げる
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define SIZE(x) ((int)(x).size())
#define UQ(v) v.erase(unique(v,begin(),v,end()),v.end());
ll INF = 1LL <<61;
#define pb push_back
int dxy4[5] = { 0,1,0,-1,0 };
int dxy8[9] = { 0,1,1,0,-1,1,-1,-1,0 };
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
ll mod7 = 1000000007;
ll mod9 = 1000000009;
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < n; i++)
#define FOR(i,x,n) for(int i=x;i<n;++i)
//vector< vector<int> > v (max1, vector<in t>(max2) );
string a[100];
int main() {
//n数l外周t時間
int n,ans = 9,s,m;
cin >> n;
rep(i, n) {
m = 0;
cin >> a[i];
s = SIZE(a[i]);
for (int j = s - 1; j > 0;j--) {
if (a[i][j] == '0')m++;
else break;
}
ans = min(m, ans);
}
cout << ans<<endl;
int i;
cin >> i;
}
提出情報
| 提出日時 |
|
| 問題 |
A - 値札 |
| ユーザ |
yharu63 |
| 言語 |
C++14 (GCC 5.4.1) |
| 得点 |
200 |
| コード長 |
869 Byte |
| 結果 |
AC |
| 実行時間 |
1 ms |
| メモリ |
256 KiB |
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
200 / 200 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
01.txt, 02.txt, 03.txt |
| All |
01.txt, 02.txt, 03.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 01.txt |
AC |
1 ms |
256 KiB |
| 02.txt |
AC |
1 ms |
256 KiB |
| 03.txt |
AC |
1 ms |
256 KiB |
| 10.txt |
AC |
1 ms |
256 KiB |
| 11.txt |
AC |
1 ms |
256 KiB |
| 12.txt |
AC |
1 ms |
256 KiB |
| 13.txt |
AC |
1 ms |
256 KiB |
| 14.txt |
AC |
1 ms |
256 KiB |
| 15.txt |
AC |
1 ms |
256 KiB |
| 16.txt |
AC |
1 ms |
256 KiB |
| 17.txt |
AC |
1 ms |
256 KiB |
| 18.txt |
AC |
1 ms |
256 KiB |
| 19.txt |
AC |
1 ms |
256 KiB |