結果
問題 |
No.661 ハローキティはりんご3個分
|
ユーザー |
![]() |
提出日時 | 2018-03-13 17:59:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 405 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 11:13:12 |
合計ジャッジ時間 | 726 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d",&i); | ~~~~~^~~~~~~~~ main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d",&n); | ~~~~~^~~~~~~~~
ソースコード
#include <cstdio> using namespace std; int main(){ int i; int n; scanf("%d",&i); for(int j = 0; j < i; j++){ scanf("%d",&n); if(n % 8 == 0 && n % 10 == 0) printf("ikisugi\n"); else if(n % 8 == 0) printf("iki\n"); else if(n % 10 == 0) printf("sugi\n"); else printf("%d\n",n/3); } return 0; }