結果

問題 No.536 人工知能
ユーザー HaijinnHaijinn
提出日時 2017-07-04 23:16:11
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 444 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 23,040 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 16:21:20
合計ジャッジ時間 760 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 0 ms
5,376 KB
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 0 ms
5,376 KB
testcase_07 AC 0 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 | scanf("%s",s);
      | ^~~~~~~~~~~~~

ソースコード

diff #

#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