結果

問題 No.536 人工知能
コンテスト
ユーザー Haijinn
提出日時 2017-07-04 23:16:11
言語 C90(gcc15)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 98 ms
コンパイル使用メモリ 27,736 KB
最終ジャッジ日時 2026-02-24 00:48:25
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.c: In function 'main':
main.c:13:1: error: C++ style comments are not allowed in ISO C90
   13 | //printf("%d\n",x);
      | ^
main.c:13:1: note: (this will be reported only once per input file)

ソースコード

diff #
raw source code

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include<string.h>
int main(){
char s[11];
int x=0;
int i;
int c=0;
char q[2];
scanf("%s",s);
x=strlen(s);
//printf("%d\n",x);
//printf("!\n");
i=x-2;
if(s[i]=='a'&&s[i+1]=='i'){
	c=1;
	
}

//printf("%d\n",c);
if(c==1){
	//printf("!\n");

	for(i=0;i<x-2;i++){
		printf("%c",s[i]);
		
		
		
		
		
		
		
	}
	printf("AI\n");
	
	
}else if(c==0){
	
	printf("%s-AI\n",s);
	
	
}

	return 0;
	
}
0