結果
| 問題 | No.3497 Sign up for traP |
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2026-05-01 10:41:45 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 531 bytes |
| 記録 | |
| コンパイル時間 | 961 ms |
| コンパイル使用メモリ | 180,276 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-01 10:41:49 |
| 合計ジャッジ時間 | 2,091 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
using ll = long long;
int main(){
string s;
cin >> s;
int n = s.size(), e = 400;
if(n < 1 || n > 32) {
cout << e << endl;
return 0;
}
rep(i, 0, n) {
char c = s[i];
if(isdigit(c)) continue;
if(isalpha(c)) continue;
if(c == '-' || c == '_') continue;
cout << e << endl;
return 0;
}
if(s[0] == '-' || s[0] == '_' || s.back() == '-' || s.back() == '_') {
cout << e << endl;
return 0;
}
cout << 200 << endl;
}
forest3