結果
問題 | No.661 ハローキティはりんご3個分 |
ユーザー |
![]() |
提出日時 | 2025-03-10 16:56:40 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 304 bytes |
コンパイル時間 | 543 ms |
コンパイル使用メモリ | 25,216 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-10 16:56:41 |
合計ジャッジ時間 | 1,011 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
コンパイルメッセージ
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("%d",&n); | ^~~~~~~~~~~~~~ main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&num); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> void main(void){ int n,num; scanf("%d",&n); for(int i = 0;i < n;i++ ){ scanf("%d",&num); if(num%8 == 0 && num%10 == 0){ printf("ikisugi\n"); }else if(num%8 == 0){ printf("iki\n"); }else if(num%10 == 0){ printf("sugi\n"); }else { printf("%d\n",num/3); } } }