結果
| 問題 |
No.2041 E-mail Address
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-17 10:06:49 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 403 bytes |
| コンパイル時間 | 312 ms |
| コンパイル使用メモリ | 25,216 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-17 10:06:50 |
| 合計ジャッジ時間 | 1,281 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 3 WA * 7 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",eMail);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
void main(void){
char eMail[1000000] = "a";
scanf("%s",eMail);
bool atSignFlg = false;
for(int i = 0 ; i < (int)strlen(eMail);i++){
if(!atSignFlg){
if(eMail[i] != '('){
printf("%c",eMail[i]);
}else{
atSignFlg = true;
}
}else{
if(eMail[i] == ')'){
atSignFlg == false;
printf("@");
continue;
}
}
}
}
Maeda