結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
![]() |
提出日時 | 2015-07-27 19:29:10 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 125 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-16 04:14:02 |
合計ジャッジ時間 | 2,328 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 7 |
コンパイルメッセージ
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%d%d",&t,&a,&b); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int t,a,b; scanf("%d%d%d",&t,&a,&b); if(t>=a && t>=b){ printf("YES\n"); while(a>1 && b>1){ printf("^>\n"); a--; b--; t--; } while(a>1){ printf("^\n"); a--; t--; } while(b>1){ printf(">\n"); b--; t--; } while(t>1){ printf("%c\n",b?'>':'<'); b=(b==0); t--; } printf("^"); if(b) printf(">"); printf("\n"); } else { printf("NO\n"); } return 0; }