結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-10 23:45:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 335 bytes |
| コンパイル時間 | 329 ms |
| コンパイル使用メモリ | 21,760 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-07 07:18:19 |
| 合計ジャッジ時間 | 846 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
2 | main(){
| ^~~~
ソースコード
#include<stdio.h>
main(){
char c;
int r = 0;
int l = 0;
int flag = 0;
while((c=getchar())!='#'){
if(c=='(')flag = 1;
else if(flag){
if(c=='*'){
r++;
}else{
l++;
}
flag = 0;
}
}
printf("%d %d\n",l,r);
}
Bantako