結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2018-05-27 09:09:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| コンパイル時間 | 280 ms |
| コンパイル使用メモリ | 31,488 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 18:23:15 |
| 合計ジャッジ時間 | 1,300 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
ソースコード
#include<stdio.h>
#include<string.h>
main(){
char S[11];
int num[] = {3,2,2,2,3,2,3,2,4,3};
scanf("%s",S);
int count = 0;
for(int i = 0;i < strlen(S);i++){
count += num[S[i]-'0'];
}
printf("%d\n",count+1);
}
Bantako