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